In EF, you can use migrations to facilitate the creation, upgrade, and downgrade of your database. You can also use the automatically generated version history to keep track of changes and stay in sync with the rest of your development team.
We have previously set up migrations in our sample project to get the ball rolling. In this section, we will add a new migration to reflect the changes we made in this chapter.
The following is a recap of how we previously set up our migrations for EF. Once again, keep in mind that your DNX version may vary:
Open a command prompt to your project folder's location.
Run the following commands:
>dotnet restore >dotnet build >dotnet ef migrations add Initial >dotnet ef database update
The preceding commands do not need to be run again, as your initial migration has already been created back in Chapter 3 , Understanding MVC. Instead, we will run additional commands...