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

Summary

In this chapter, we saw how to use Entity Framework to maintain a database schema. You learned that we can enable migrations on a project by running the Enable-Migrations commandlet inside the NuGet package manager console. Once we enabled migrations, which created a configuration class, we could start moving the schema of our database forward. Developers have two options for migrations. They can rely on automatic migrations or create explicit migrations. Automatic migrations have limitations. Some tasks, such as setting a default value, are not possible. In order to ensure migrations consistency, developers may opt to only use explicit migrations. All explicit migrations inherit from the DbMigration class, which contains methods to allow ...

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