Beispiel #1
0
        static void Main(string[] args)
        {
            var serviceCollection = new ServiceCollection();

            serviceCollection.AddScoped <IPetShopRepository, PetShopRepository>();
            serviceCollection.AddScoped <IPetShopService, PetShopService>();

            var serviceProvider = serviceCollection.BuildServiceProvider();
            var petShopService  = serviceProvider.GetRequiredService <IPetShopService>();
            var UI = new PetShopUI(petShopService);

            FakeDB.InitOwnerData();
            FakeDB.InitPetData();
            UI.StartUI();
        }