.Net Interview Questions and Answers

Search:

C# Entity framework interview questions with answers: - What is the difference between POCO, code first and simple EF approach?

By : Shiv Prasad Koirala | Aug 17th, 2013 | Views : 31213 | Comments : 0 Bookmark and Share

All these three approaches define how much control you want on your code. Entity framework is an OR MAPPER it generates lot of code, it creates your middle tier (Entity) and Data access layer (Context).

 

But lot of times you want to enjoy benefits of both the world you want the auto-generation part to minimize your development time and also you want control on the code so that you can maintain code quality.

                                  


Below is the difference table which defines each of the approaches. In Simple entity framework everything is auto generated and so you need the EDMX XML file as well. POCO is semi-automatic so you have full control on the entity classes but then the context classes are still generated by the EDMX file.

 

In code first you have complete control on how you can create the entity and the context classes. Because you are going to manually create these classes you do not have dependency on the EDMX XML file. Below is a simple table which shows the cross comparison.

 

 

EDMX

Entity

Context

Simple entity framework

Needed

Auto

Auto

POCO approach

Needed

Manual

Manual

Code First

Not Needed

Manual

Manual

 

Below is a great ADO.NET Entity framework interview question video created by www.questpond.com which shows how to do CRUD using Entity framework.


 
Rate this Article :
1 Star
2 Stars
3 Stars
4 Stars
5 Stars
1 1 1 2 1
 
 
 
 

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

Article Categories

Learn in Hindi