PIBD_21_Basalov_A_D_Project.../project/ProjectTourAgency/Program.cs

36 lines
1.2 KiB
C#
Raw Normal View History

using ProjectEmployeeAgency.Repositories;
using ProjectRouteAgency.Repositories;
using ProjectTourAgency.Implementations;
using ProjectTourAgency.Repositories;
using Unity;
2024-11-08 19:24:45 +04:00
namespace ProjectTourAgency
{
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<FormTourAgency>());
}
private static IUnityContainer CreateContainer()
{
var container = new UnityContainer();
container.RegisterType<IAddMoneyRepository, AddMoneyRepository>();
container.RegisterType<IClientRepository, ClientRepository>();
container.RegisterType<IRouteRepository, RouteRepository>();
container.RegisterType<IEmployeeRepository, EmployeeRepository>();
container.RegisterType<ITourRepository, TourRepositiry>();
return container;
2024-11-08 19:24:45 +04:00
}
}
}