presence/ui/Program.cs

19 lines
492 B
C#
Raw Normal View History

2024-11-08 08:08:54 +00:00
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();