O'Reilly logo

Code-First Development with Entity Framework by Sergey Barskiy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7: Database Migrations and Additional Features

Q1. This is correct. You have to run the Enable-Migrations commandlet to easily create all the necessary artifacts to support migrations.

Q2. The answer is false. Some operations, such as setting custom default values, cannot be done with automatic migrations. Neither can we create non-Entity Framework objects, such as stored procedures.

Q3. The answer is false. Entity Framework needs to compare our model, defined by entity classes and context, with the target database to know what structures have changed.

Q4. The answer is C—we need to create an empty migration which signals to Entity Framework that the target structure matches the model.

Q5. This is not correct. We can use the NuGet Package ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required