ISEbd-21_Sharonov_I_A_Proje.../ProjectAirline/Program.cs
2024-11-18 09:25:44 +04:00

35 lines
1.2 KiB
C#

using ProjectAirline.Repositories;
using ProjectAirline.Repositories.Implementations;
using Unity;
namespace ProjectAirline
{
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<FormAirline>());
}
private static IUnityContainer CreateContainer()
{
var container = new UnityContainer();
container.RegisterType<IFlightRepository, FlightRepository>();
container.RegisterType<IPassangerRepository, PassangerRepository>();
container.RegisterType<IPlaneRepository, PlaneRepository>();
container.RegisterType<IPreparatoryWorkRepository, PreparatoryWorkRepository>();
container.RegisterType<ITicketRepository, TicketRepository>();
return container;
}
}
}