Entity Framework - EF Code First
What is Entity Framework Code First?
When you start learning Entity Framework, you will often see the term Entity Framework Code First. Code first is one of the three approaches to create an entity model.
In Entity Framework, code first was introduced in Entity Framework 4.1. Code First modeling workflow targets a database that doesn't exist, and Code First will create it.
Code-First APIs will create the database on the fly based on your entity classes and configuration. It can also update the database if the model changes, using a feature called Code First Migrations.
- Code First is very popular approach and has full control over the code rather than database activity.
- In this approach, we can do all the database operations from the code and manual changes to database have been lost and everything is depended on the code.
- In this you need to create POCO entities as data model.
For further details please see the following links.