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 petService      = serviceProvider.GetRequiredService <IPetShopService>();

            FakeDB.DefaultData();
            //new Program(petService);


            Console.ReadLine();
        }