using data.RemoteData.RemoteDataBase; using data.Repository; using domain.UseCase; using ui; using Microsoft.Extensions.DependencyInjection; 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();