1. What is Entity Framework Model First Approach
What is Entity Framework Model First Approach?
In Entity Framework Model First Approach, you design entity directly in the EDMX designer in visual studio and later this entity converted into database and table. In this approach, you create a model in designer and this model will generate database and tables for you. It is much helpful when you want to design model class visually in graphics designer. In this tutorial, we will show you how to create an entity in EDMX designer and generate database and model class.
Here, I am going to create a simple project for Customer Profile
page and Customer Purchase
page. The project will ask customers details and save them to the database using Entity Framework Model First Approach. Later the customer who is registered can buy a product in Customer Purchase page. It is one to many relationships in which there may be only one registration for each customer but each customer can buy multiple products.
PART 1: Create New MVC 5 Project and Install EF 6
PART 2: Create Entity Data Model and Class in EDMX Designer
PART 3: Generating Database From Entity Class Designed in EDMX
PART 4: Add Scaffolded Item and Run Your Project
Summary
In this tutorial, you learned introduction of Model First Approach of Entity Framework 6. In the next chapter, we will create a project and Install EF 6 for learning EF Model First Approach.