Code-First

Last but not least comes Entity Framework's flagship approach since version 4, which enables an elegant, highly-efficient data model development workflow. The appeal of this approach can be easily found in its premise; the Code-First approach allows developers to define model objects using only standard classes, without the need for any design tool, XML mapping files, or cumbersome piles of autogenerated code.

To summarize, we can say that going Code-First means writing the data model entity classes we'll be using within our project and letting Entity Framework generate the database accordingly:

The pros and cons are explained in ...

Get ASP.NET Core 3 and Angular 9 - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.