diff --git a/aspnetcore/tutorials/first-mvc-app/new-field.md b/aspnetcore/tutorials/first-mvc-app/new-field.md index 9209793073..abea279d5f 100644 --- a/aspnetcore/tutorials/first-mvc-app/new-field.md +++ b/aspnetcore/tutorials/first-mvc-app/new-field.md @@ -92,24 +92,23 @@ Update-Database The `Add-Migration` command tells the migration framework to examine the current `Movie` model with the current `Movie` DB schema and create the necessary code to migrate the DB to the new model. +The name "Rating" is arbitrary and is used to name the migration file. It's helpful to use a meaningful name for the migration file. + +If all the records in the DB are deleted, the initialize method will seed the DB and include the `Rating` field. + # [Visual Studio Code / Visual Studio for Mac](#tab/visual-studio-code+visual-studio-mac) [!INCLUDE[](~/includes/RP-mvc-shared/sqlite-warn.md)] -Run the following command: +Delete the database and use migrations to re-create the database. To delete the database, delete the database file (*MvcMovie.db*). Then run the `ef database update` command: -```cli -dotnet ef migrations add Rating +```console dotnet ef database update ``` --- -The name "Rating" is arbitrary and is used to name the migration file. It's helpful to use a meaningful name for the migration file. - -If all the records in the DB are deleted, the initialize method will seed the DB and include the `Rating` field. - Run the app and verify you can create/edit/display movies with a `Rating` field. You should add the `Rating` field to the `Edit`, `Details`, and `Delete` view templates. > [!div class="step-by-step"] diff --git a/aspnetcore/tutorials/first-mvc-app/working-with-sql.md b/aspnetcore/tutorials/first-mvc-app/working-with-sql.md index 2bb52ef8d4..5b35d26b8e 100644 --- a/aspnetcore/tutorials/first-mvc-app/working-with-sql.md +++ b/aspnetcore/tutorials/first-mvc-app/working-with-sql.md @@ -63,6 +63,7 @@ Note the key icon next to `ID`. By default, EF will make a property named `ID` t # [Visual Studio Code / Visual Studio for Mac](#tab/visual-studio-code+visual-studio-mac) [!INCLUDE[](~/includes/rp/sqlite.md)] +[!INCLUDE[](~/includes/RP-mvc-shared/sqlite-warn.md)] ---