Raspisanie/Zurnal/Program.cs

18 lines
495 B
C#
Raw Normal View History

2024-11-07 11:31:00 +00:00
using Zurnal.Domain.UseCase;
using Microsoft.Extensions.DependencyInjection;
using UI;
using Data.Repository;
2024-10-21 11:56:16 +00:00
2024-11-07 11:31:00 +00:00
IServiceCollection services = new ServiceCollection();
2024-10-21 11:56:16 +00:00
2024-11-07 11:31:00 +00:00
services
.AddDbContext<RemoteDateBaseContext>()
.AddSingleton<IGroupRepository,SQLGroupRepositoryImpl>()
.AddSingleton<GroupUseCase>()
.AddSingleton<GroupConsol>();
var serviceProvider = services.BuildServiceProvider();
GroupConsol groupUI = serviceProvider.GetService<GroupConsol>();
groupUI.AddGroup();