Que 1:- What is Entity Framework?

Entity Framework in asp.net is the enhancement of ADO.net which provides the strong mapping facilities. It is an ORM (Object Relational Mapping) which helps to interact with Relational Database using object. It provides the higher level of abstraction.

Que 2:-How many Type of approaches available in Entity Framework?

There are 3 approaches in Entity Framework

  • Database First
  • Model First
  • Code First

Database First

Database first is the approach in which our database has already generated. And using this database we create our Model and code in entity framework.

Model First

In Model first we create designer (model) first. If database not exist then we can create database using this designer

Code First

In code first we create code file first and then if database not exist then database will be created automatically at runtime using this code.

Que 3:- What is difference between LINQ to SQL and Entity Framework?

The major difference between LINQ to SQL and Entity Framework is that LINQ to SQL support only SQL Server but Entity Framework supports almost all Relational Database.

LINQ to SQL does not provide limited mapping facility but entity framework provides full mapping facility.

Que 4:- What are three Schema Definition Language in EDM?

SSDL (Storage Schema Definition Language)

It stores the schema of database which we created

CSDL (Conceptual Schema Definition Language)

It stores the schema of cs file which generated for each table of database. This files defines the properties created for that table and all the relationship.

ML (Mapping Language) or C-S M Mapping

It stores the mapping of SSDL and CSDL.

Que 5:-What is ObjectContext class in Entity Framework?

ObjectContext is the class which helps us to perform Insert, Update, Delete and create in Entity Framework.

This class is available in System.Data.Entity namespace.