PIbd-13_Baryshev_D.A._Garage/ProjectGarage/Program.cs

36 lines
1.2 KiB
C#
Raw Normal View History

using ProjectGarage.Repositories;
using ProjectGarage.Repositories.Implementations;
using Unity;
2024-11-02 19:41:16 +04:00
namespace ProjectGarage
{
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<FormGarage>());
}
private static IUnityContainer CreateContainer()
{
var container = new UnityContainer();
container.RegisterType<ITruckRepository, TruckRepository>();
container.RegisterType<IFuelRepository, FuelRepository>();
container.RegisterType<IRouteRepository, RouteRepository>();
container.RegisterType<IDriverRepository, DriverRepository>();
container.RegisterType<ITransportationRepository, TransportationRepository>();
container.RegisterType<IFuelReplishmentRepository, FuelReplishmentRepository>();
return container;
2024-11-02 19:41:16 +04:00
}
}
}