Q1. What is Entity Framework?
Entity Framework is
an ORM from Microsoft that will enable the developers to work with domain
specific objects, which eliminates the extra code being written in the data access
layer.
Q2. Why to use Entity Framework?
Writing ADO.NET
code and managing it is a tedious job. To avoid this, Microsoft has provided a
solution - Entity Framework. Entity Framework reduces a great deal of code by
enabling to work with relational data as domain specific objects.
Q3. What are the components of Entity Framework Architecture?
Below are the
components of Entity Framework –
·
Entity Data Model (EDM)
·
LINQ to Entities
·
Entity SQL
·
Object Service
·
Entity Client Data Provider
·
ADO.Net Data Provider
Q4. What are the parts of Entity Data Model (EDM)?
Below are the parts
of Entity Data Model –
·
Conceptual Model
·
Mapping
·
Storage Model
Q5. How to create Entity Data Model (EDM)?
Add New Item ->
ADO.NET Entity Data Model, which generates file with .edmx extension.
Q6. What does .edmx consists of?
.edmx file is a XML
file and it has Conceptual Model, Storage Model and Mapping details i.e,
·
SSDL (Store schema definition language)
·
CSDL (Conceptual schema definition language)
·
MSL (Mapping specification language)
Q7. What is Conceptual Model?
Conceptual Models
are the model classes which contain the relationships. These are independent of
the database design.
Q8. What is the meaning of
Pluralize and Singularize in Entity Framework?
Pluralize and Singularize gives the meaningful naming
conventions for objects.
We will get this option while adding an edmx file. On selecting
this option Entity Framework will adhere to Singular or Plural coding
conventions.
Q9. What are the advantages of
Model First Approach?
Below are the
advantages of Model First Approach –
·
Model first approach gives the flexibility to design the Entity Models
independently and gives an option to improve at later stages.
Model classes can
be created by drawing it in the edmx designer, so no much of database is
required.
Q10. What are the advantages of
Code First Approach?
Below are the
advantages of Code First Approach –
·
Based on business objects we can decide the database structure.
·
We can decide which classes need to be serialized and can specify the
collection to eager load.
·
Good for smaller applications.
0 Comments