39 lines
1.4 KiB
C#
39 lines
1.4 KiB
C#
using ProjectLibrary.Repositories.Implementations;
|
|
using ProjectLibrary.Repositories;
|
|
using Unity;
|
|
|
|
namespace ProjectLibrary
|
|
{
|
|
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<FormLibrary>());
|
|
}
|
|
|
|
private static IUnityContainer CreateContainer()
|
|
{
|
|
var container = new UnityContainer();
|
|
|
|
// Ðåãèñòðàöèÿ ðåïîçèòîðèåâ
|
|
container.RegisterType<IBookRepository, BookRepository>();
|
|
container.RegisterType<ILibraryRepository, LibraryRepository>();
|
|
container.RegisterType<IReaderRepository, ReaderRepository>();
|
|
container.RegisterType<IOrderRepository, OrderRepository>();
|
|
container.RegisterType<ITicketExtensionsRepository, TicketExtensionsRepository>();
|
|
container.RegisterType<IBookOrdersRepository, BookOrdersRepository>();
|
|
container.RegisterType<IBookLibraryRepository, BookLibraryRepository>();
|
|
|
|
return container;
|
|
}
|
|
|
|
|
|
}
|
|
} |