34 lines
1.2 KiB
C#
34 lines
1.2 KiB
C#
using ProjectWorkshop.Repositories;
|
|
using ProjectWorkshop.Repositories.Implementation;
|
|
using Unity;
|
|
|
|
namespace ProjectWorkshop
|
|
{
|
|
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<FormWorkshop>());
|
|
}
|
|
|
|
private static IUnityContainer CreateContainer()
|
|
{
|
|
var container = new UnityContainer();
|
|
|
|
container.RegisterType<IAssemblerRepository, AssemblerRepository>();
|
|
container.RegisterType<IAssemblyRepository, AssemblyRepository>();
|
|
container.RegisterType<IProductAssemblyRepository, ProductAssemblyRepository>();
|
|
container.RegisterType<IProductRepository, ProductRepository>();
|
|
container.RegisterType<IProductTypeRepository, ProductTypeRepository>();
|
|
|
|
return container;
|
|
}
|
|
}
|
|
} |