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

33 lines
1.1 KiB
C#
Raw Normal View History

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<IClientRepository, ClientRepository>();
container.RegisterType<IDiscountRepository, DiscountRepository>();
container.RegisterType<IReceiptRepository, ReceiptRepository>();
container.RegisterType<ITourRepositiry, TourRepositiry>();
return container;
2024-11-08 19:24:45 +04:00
}
}
}