﻿using Organizer.Repository.DependencyInjection;
using Organizer.WebApi.DependencyInjection;
using SimpleInjector;
using SimpleInjector.Integration.WebApi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;

namespace Organizer.WebApi
{
    public static class DependencyInjectionConfig
    {
        public static void Register(HttpConfiguration config)
        {
            var container = new Container();

            container.RegisterWebApis();
            container.RegisterRepositories();
            
            config.DependencyResolver = new SimpleInjectorWebApiDependencyResolver(container);
        }
    }
}
