Code-First: Good if you already have a clear model, and the project start from scratch
Model-First: if you design entities when we work together with other team, IE: User, designer, developer, and other stake holder, like using modelling on Visual Studio, it's non technical works
Database-First: we do not have an choice when we create a project using existing database.
General: It's good to know them all, in some cases one of them is better, in other case is not.
Unfortunately I am not a good person to describe things.
Based on my experience, I can not compare both of them. To me, they are diffrent things. We can use LINQ at the same time we use EF. Also we can use both SQL Command and LINQ at the same time we use EF. Using LINQ is much easier, but for bulky data it can
be inefficient, we need to consider performance. Or when we general update one column on a database, we do not need to bring the data into Web Server, just send the SQL command to SQL Server and let the SQL server do the Update Command without data traffic on
networks.
On EF vs. L2S: L2S is supported but is no longer being developed by Microsoft. EF is continuing to be improved and is the recommended choice unless you are working with a legacy system that already uses L2S.
2) please discuss all the points regarding the difference between LINQ & Entity Framework?
The very important point is that EF supports Many-To-Many,One-To-One or One-to-Many relationship among tables;compared with this,LINQ only supports One-to-Many or One-To-One relationship,not directly support Many-To-Many,so in the LINQ's diagram,you have
to see two "One-To-Many" to express "Many-To-Many"。
mou_inn
Participant
780 Points
955 Posts
i have 2 question regarding LINQ & Entity Framework
May 17, 2012 06:05 AM|LINK
1) how many type of technique are there to work with Entity Framework like
code first , model first & database first. am i right
please discuss about what is ode first , model first & database first concept and their differences .
2) please discuss all the points regarding the difference between LINQ & Entity Framework?
hoping to get elaborate discussion. thanks
jsiahaan
Contributor
2320 Points
595 Posts
Re: i have 2 question regarding LINQ & Entity Framework
May 17, 2012 07:28 AM|LINK
Hi,
Unfortunately I am not a good person to describe things.
c u
Indonesian Humanitarian Foundation
jsiahaan
Contributor
2320 Points
595 Posts
Re: i have 2 question regarding LINQ & Entity Framework
May 17, 2012 07:35 AM|LINK
Hi
I forgot the second point:
Based on my experience, I can not compare both of them. To me, they are diffrent things. We can use LINQ at the same time we use EF. Also we can use both SQL Command and LINQ at the same time we use EF. Using LINQ is much easier, but for bulky data it can be inefficient, we need to consider performance. Or when we general update one column on a database, we do not need to bring the data into Web Server, just send the SQL command to SQL Server and let the SQL server do the Update Command without data traffic on networks.
c u
Indonesian Humanitarian Foundation
tdykstra
Contributor
4460 Points
624 Posts
Microsoft
Moderator
Re: i have 2 question regarding LINQ & Entity Framework
May 17, 2012 02:04 PM|LINK
On CF/DF/MF, see this tutorial:
http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application
On EF vs. L2S: L2S is supported but is no longer being developed by Microsoft. EF is continuing to be improved and is the recommended choice unless you are working with a legacy system that already uses L2S.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: i have 2 question regarding LINQ & Entity Framework
May 19, 2012 12:12 AM|LINK
The very important point is that EF supports Many-To-Many,One-To-One or One-to-Many relationship among tables;compared with this,LINQ only supports One-to-Many or One-To-One relationship,not directly support Many-To-Many,so in the LINQ's diagram,you have to see two "One-To-Many" to express "Many-To-Many"。
For more about this,you can also refer this:
http://stackoverflow.com/questions/8676/entity-framework-vs-linq-to-sql