presence/ui/Program.cs
2024-11-08 11:08:54 +03:00

19 lines
492 B
C#

using data.RemoteData;
using Data.Repository;
using domain;
using Microsoft.Extensions.DependencyInjection;
using ui;
IServiceCollection services = new ServiceCollection();
services
.AddDbContext<RemoteDataBaseContext>()
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
.AddSingleton<GroupUseCase>()
.AddSingleton<GroupUI>();
var serviceProvider = services.BuildServiceProvider();
GroupUI groupUI = serviceProvider.GetService<GroupUI>();
groupUI.AddGroup();