using ProjectShoeShop.Repositories;
using ProjectShoeShop.Repositories.Implementations;
using Unity;

namespace ProjectShoeShop
{
    internal static class Program
    {
        /// <summary>
        ///  The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            // To customize application configuration such as set high DPI settings or default font,
            // see https://aka.ms/applicationconfiguration.
            ApplicationConfiguration.Initialize();
            Application.Run(CreateContainer().Resolve<FormShoesShop>());
        }

        private static IUnityContainer CreateContainer()
        {
            var container = new UnityContainer();

            container.RegisterType<IClientRepository, ClientRepository>();
            container.RegisterType<IOrderRepository, OrderRepository>();
            container.RegisterType<IShoesRepository, ShoesRepository>();
            container.RegisterType<ISupplyShoesRepository, SupplyShoes>();
            container.RegisterType<ISupplyRepository, SupplyRepository>();
        
            return container;
        }

    }
}