ISEbd-22_Rozhkov.I.E._Simple/GasStation/Program.cs
2024-11-15 18:27:06 +04:00

34 lines
1.1 KiB
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>();
container.RegisterType<IProductRepository, ProductRepository>();
return container;
}
}