23 lines
794 B
C#
23 lines
794 B
C#
using _123.Data.RemoteData.RemoteDatabase;
|
|
using _123.Data.ReportsHistory;
|
|
using _123.Data.Repository;
|
|
using _123.Domain.UseCase;
|
|
using _123.UI;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using System.Text.RegularExpressions;
|
|
|
|
IServiceCollection services = new ServiceCollection();
|
|
services
|
|
.AddSingleton<UserUseCase>()
|
|
.AddSingleton<GroupUseCase>()
|
|
.AddSingleton<PresenceUseCase>()
|
|
.AddSingleton<MainMenuUI>()
|
|
.AddDbContext<RemoteDatabaseContext>()
|
|
.AddSingleton<IPresenceRepository, SQLPresenceRepositoryImpl>()
|
|
.AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
|
|
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>();
|
|
var serviceProvider = services.BuildServiceProvider ();
|
|
|
|
var mainMenuUI = serviceProvider.GetRequiredService<MainMenuUI>();
|
|
|