Services.CreateScope() Missing in Asp.net Core 2.1

asp.net-core-2.1 entity-framework-core

Question

What replaced Services.CreateScope() in 2.1?

I am trying to follow this tutorial but it seems like stuff has changed quite a bit

https://dotnetthoughts.net/seed-database-in-aspnet-core/

1
5
6/18/2018 8:36:22 PM

Popular Answer

I had the same problem with the ASP.NET Core MVC with Entity Framework Core tutorial, written for .NET Core 2, trying to run it with .NET Core 2.1. It worked fine once I added

using Microsoft.Extensions.DependencyInjection;

to the problem file, in my case Program.cs.

14
1/28/2020 7:04:36 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow