using Demo.Data.RemoteData.RemoteDataBase; using Demo.Data.Repository; using Demo.Domain.UseCase; using Demo.UI; using Microsoft.Extensions.DependencyInjection; class Program { static void Main(string[] args) { IServiceCollection services = new ServiceCollection(); services.AddDbContext() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton(); var serviceProvaider = services.BuildServiceProvider(); MainMenuUI mainMenuUI= serviceProvaider.GetService(); mainMenuUI.DisplayMenu(); } }