Raspisanie/Zurnal/Program.cs
2024-11-07 14:31:00 +03:00

18 lines
495 B
C#

using Zurnal.Domain.UseCase;
using Microsoft.Extensions.DependencyInjection;
using UI;
using Data.Repository;
IServiceCollection services = new ServiceCollection();
services
.AddDbContext<RemoteDateBaseContext>()
.AddSingleton<IGroupRepository,SQLGroupRepositoryImpl>()
.AddSingleton<GroupUseCase>()
.AddSingleton<GroupConsol>();
var serviceProvider = services.BuildServiceProvider();
GroupConsol groupUI = serviceProvider.GetService<GroupConsol>();
groupUI.AddGroup();