You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the section Scaffold movie pages under the tab for Visual Studio Code the instructions are sequenced to first show use of the aspnet-codegenerator CLI, then how to modify Program.cs to configure the context w/ SQLite and SQL Server.
I think the order should be reversed.
If the reader attempts to invoke the aspnet-codegenerator command prior to configuring the context, s/he will get an error like the following
Attempting to figure out the EntityFramework metadata for the model and DbContext: 'Movie'
Unable to create a 'DbContext' of type 'MvcMovie.Data.MvcMovieContext'.
The exception 'Unable to resolve service for type
'Microsoft.EntityFrameworkCore.DbContextOptions`1[MvcMovie.Data.MvcMovieContext]'
...
Description
In the section Scaffold movie pages under the tab for Visual Studio Code the instructions are sequenced to first show use of the
aspnet-codegenerator
CLI, then how to modify Program.cs to configure the context w/ SQLite and SQL Server.I think the order should be reversed.
If the reader attempts to invoke the
aspnet-codegenerator
command prior to configuring the context, s/he will get an error like the followingPage URL
https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/adding-model?view=aspnetcore-8.0&tabs=visual-studio-code
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/tutorials/first-mvc-app/adding-model.md
Document ID
48e81b42-7c2b-afbf-71e6-d4f442a4bd1f
Article author
@wadepickett
The text was updated successfully, but these errors were encountered: