Database migration
We have created the business entity—the Employee
class. Now, we can proceed with the migration. Migration is a two-step process: in the first step, we create the migration files. This can be done by executing the following command from the command prompt from the context of the project:
dnx ef migrations add InitialMigration
This command will create the migration files in your project, as shown in the following screenshot:
Then execute the following command to create the database:
This command will read the migration files created ...
Get Learning ASP.NET Core MVC Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.