using data.RemoteData.RemoteDataBase; using data.Repository; using domain.UseCase; using ui; using Microsoft.Extensions.DependencyInjection; using ui.ui; IServiceCollection services = new ServiceCollection(); services .AddDbContext() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton(); var serviceProvider = services.BuildServiceProvider(); MainMenuUI mainMenuUI = serviceProvider.GetService(); mainMenuUI.DisplayMenu();