资讯

Code First Migrations allow for database changes to be implemented all through code. Through the use of Package Manager Console (PMC), commands can be used to scaffold database changes.
Code First is a new development approach in the Entity Framework 4.1 stack that can simplify the understanding and maintenance of your domain model.
There are three approaches to model your entities in Entity Framework: Code First, Model First, and Database First. This article discusses all these three approaches and their pros and cons.
You can rapidly develop your database design in SQL Management Studio then generate the code model in just few clicks. More recently I’ve come to prefer #1 (or #2) for the following reasons.