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

36 lines
1.2 KiB
C#

using ProjectEmployeeAgency.Repositories;
using ProjectRouteAgency.Repositories;
using ProjectTourAgency.Implementations;
using ProjectTourAgency.Repositories;
using Unity;
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;
}
}
}