From 9ecf099ef48ae467273ae22e01fa684fa003ed0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 9 Feb 2021 11:17:32 +0300 Subject: [PATCH] Add migration startup project note to the tutorial. --- docs/en/Tutorials/Part-1.md | 2 ++ docs/en/Tutorials/Part-7.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/Tutorials/Part-1.md b/docs/en/Tutorials/Part-1.md index 3348679420..4667b8e539 100644 --- a/docs/en/Tutorials/Part-1.md +++ b/docs/en/Tutorials/Part-1.md @@ -189,6 +189,8 @@ Add-Migration "Created_Book_Entity" ![bookstore-pmc-add-book-migration](./images/bookstore-pmc-add-book-migration-v2.png) +> If you get an error like "*Your startup project ... doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work*", right click to the `Acme.BookStore.EntityFrameworkCore.DbMigrations` project and **Set as the Startup Project** and try again. + This will create a new migration class inside the `Migrations` folder of the `Acme.BookStore.EntityFrameworkCore.DbMigrations` project. Before updating the database, read the section below to learn how to seed some initial data to the database. diff --git a/docs/en/Tutorials/Part-7.md b/docs/en/Tutorials/Part-7.md index ec3ad9a8e0..e14237fd59 100644 --- a/docs/en/Tutorials/Part-7.md +++ b/docs/en/Tutorials/Part-7.md @@ -70,7 +70,7 @@ This is just like done for the `Book` entity before, so no need to explain again ## Create a new Database Migration -Open the **Package Manager Console** on Visual Studio and ensure that the **Default project** is `Acme.BookStore.EntityFrameworkCore.DbMigrations` in the Package Manager Console, as shown on the picture below. Also, set the `Acme.BookStore.Web` (or `Acme.BookStore.HttpApi.Host`, depending on your solution) as the **startup project** (right click it on the solution explorer and click to "Set as Startup Project"). +Open the **Package Manager Console** on Visual Studio and ensure that the **Default project** is `Acme.BookStore.EntityFrameworkCore.DbMigrations` in the Package Manager Console, as shown on the picture below. Also, set this project as the **startup project** (right click it on the solution explorer and click to "Set as Startup Project"). Run the following command to create a new database migration: