Browse Source

Add migration startup project note to the tutorial.

pull/7673/head
Halil İbrahim Kalkan 6 years ago
parent
commit
9ecf099ef4
  1. 2
      docs/en/Tutorials/Part-1.md
  2. 2
      docs/en/Tutorials/Part-7.md

2
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) ![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. 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. Before updating the database, read the section below to learn how to seed some initial data to the database.

2
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 ## 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: Run the following command to create a new database migration:

Loading…
Cancel
Save