Entity Framework supports
1. Database first or schema first approach
2. Model first approach
3. Code first approach
Code-first approach allows us to create our custom classes first and based on those custom classes entity framework can generate database automatically for us.
Database first approach, as the name suggests, we start with the database, so we design our tables using visual designers and then EF generate the domain classes based on the database. This is a traditional approach that a lot of developers have been doing for years.
In model-first approach approach, we use a visual designer in visual studio to model our classes and their associations. These are basically some kind of UML diagrams. Based on these diagrams, EF generates domain classes and database for us.
#EF #EntityFramework #Entity framework #ef core #codinghacks #ef worflows
#codefirst introduction #Database first introduction