2024-11-08 21:29:34 +04:00
|
|
|
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();
|
2024-11-08 21:29:34 +04:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|