Demo/Program.cs

19 lines
671 B
C#
Raw Permalink Normal View History

using Posechaemost.Data.Repository;
using Posechaemost.Domain.UseCase;
using Posechaemost.UI;
2024-10-23 07:06:56 +00:00
using Microsoft.Extensions.DependencyInjection;
using System.Text.RegularExpressions;
IServiceCollection services = new ServiceCollection();
services
.AddSingleton<IGroupRepository, GroupRepositoryImpl>()
.AddSingleton<UserUseCase>();
var serviceProvider = services.BuildServiceProvider();
GroupRepositoryImpl groupRepositoryImpl = new GroupRepositoryImpl();
2024-10-23 07:06:56 +00:00
UserUseCase userUseCase = serviceProvider.GetService<UserUseCase>();
GroupUseCase groupUseCase = new GroupUseCase(groupRepositoryImpl);
MainMenuUI mainMenuUI = new MainMenuUI(userUseCase, groupUseCase);