ISEbd-22_Rozhkov.I.E._Simple/GasStation/Program.cs
2024-11-13 23:20:06 +04:00

33 lines
1014 B
C#

using GasStation.Repositories;
using GasStation.Repositories.Implementations;
using System.Drawing.Text;
using Unity;
namespace GasStation;
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<FormGasStation>());
}
private static IUnityContainer CreateContainer()
{
var container = new UnityContainer();
container.RegisterType<IGasmanRepository, GasmanRepository>();
container.RegisterType<ISellingRepository,SellingRepository>();
container.RegisterType<ISupplierRepository, SupplierRepository>();
container.RegisterType<ISupplyRepository, SupplyRepository>();
return container;
}
}