ISEbd-21_Sharonov_I_A_Proje.../ProjectAirline/Program.cs

35 lines
1.2 KiB
C#
Raw Permalink Normal View History

2024-11-13 00:12:08 +04:00
using ProjectAirline.Repositories;
using ProjectAirline.Repositories.Implementations;
using Unity;
2024-10-30 09:08:41 +04:00
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();
2024-11-18 09:25:44 +04:00
2024-11-13 00:12:08 +04:00
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;
2024-10-30 09:08:41 +04:00
}
}
}