Entity framework Introduction | Angular | ASP.NET Tutorials

For Consultation : +91 9887575540

Stay Connected :

I am going to start writing blogs based on Microsoft entity framework as far as today’s scenario people are working on entity framework. Let me tell you about the different approaches of entity framework by which we can make communication between ASP.net MVC and database. Basically there are three approaches to perform database connectivity for database operations.

  1. entity framework code first approach
  2. entity framework model first approach
  3. entity framework  database first approach


  1. Entity framework Code first: code first approach define classes in model and as per these classes definition (properties) database tables are created .Generally we use this approach when we are creating the database instantly (new database).
  2. Entity framework model first: We use model first approach when we want to create a new database using edmx file .EDMX file can be created by using the Visual Studio utility as per the EDMX models database tables and  database classes are generated.
  3. Entity framework database first approach : In this approach first we define the database schema ( database tables ,functions ,stored procedure etc) and as per the database schema definition EDMX file generated and the model classes are generated.