Hi there :wave: ! Beginner here, trying to follow the tutorial.
In "Register The Database Context" section, the method "UseInMemoryDatabase" does not seem to exist / can't be resolved. Did the method change, by any chance?
Ref https://docs.microsoft.com/en-ca/aspnet/core/tutorials/first-web-api?view=aspnetcore-3.0&tabs=visual-studio#register-the-database-context
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Addition to Microsoft.EntityFrameworkCore.SqlServer you also need to install Microsoft.EntityFrameworkCore.InMemory Nuget package. It's missing in tutorial.
Thank you so much @kmkivist ! That made the trick. Hopefully that will be added to the tutorial!
That's in the instructions
Use the preceding instructions to add the Microsoft.EntityFrameworkCore.InMemory NuGet package.
dotnet new webapi -o TodoApi
cd TodoApi
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package Microsoft.EntityFrameworkCore.InMemory
code -r ../TodoApi
@Rick-Anderson
Thank you for the reply! You are correct, it is in the instructions for Visual Studio Code.
However, it is missing from Visual Studio instructions (not Code). Is the recommended way to use Visual Studio Code instead?
It's not missing,
Use the preceding instructions to add the Microsoft.EntityFrameworkCore.InMemory NuGet package.
Oh, that's correct. My bad, I missed that line. Thank you for taking the care and sorry for that!
Most helpful comment
Addition to Microsoft.EntityFrameworkCore.SqlServer you also need to install Microsoft.EntityFrameworkCore.InMemory Nuget package. It's missing in tutorial.