This is not really a valid question. There is no LINQ vs EF. LINQ is a framework for querying collections, which includes EF (LINQ to Entities), but also includes LINQ to SQL, LINQ to Objects, LINQ to XML, etc, etc
Entity Framework is an ORM framework for working with databases.
So the short answer is, you should study both.
"Sometimes, it is more important to have the right problem than the best solution."
I would say starting with LINQ to SQL is probably a good way to go. The learning curve there is much lower and will get you exposed to LINQ and how to query with it.
"Sometimes, it is more important to have the right problem than the best solution."
Since you work for Microsoft, I assume that you represent Microsoft's actual position on Linq To SQL, and it is therefore Microsoft's official view that Linq To SQL is obselete?
That doesn't make much sense to me given that new things were added to Linq To Sql in the latest version of the framework (http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40/),
and previously the ADO.NET team and Anders Hjelsberg have been categoric in their assertion that Linq To SQL is not dead.
I also don't agree with the statement "L2SQL is essentially obsolete".
I know there has been a ton of talk of LINQ to SQL being dead, its still a very useful technology. And in this case, where someone is trying to learn about LINQ and EF, LINQ to SQL is a great place to start, as its barrier to entry is much lower than EF.
"Sometimes, it is more important to have the right problem than the best solution."
When did this happen? I was under the impression that Code First Stored Procedure support did not make it into Entity Framewrok 4.1 RTW. Here's a link to the article on the ADO.NET team blog which details what is and is not supported in EF 4.1.
anderson7777
Member
141 Points
280 Posts
ADO.NET vs LINQ vs ENTITY FRAMEWORK vs SQL
May 05, 2011 05:13 PM|LINK
What is the difference?
Wich one should i study?
thx
adillsonn
tehremo
Star
10540 Points
1704 Posts
Re: ADO.NET vs LINQ vs ENTITY FRAMEWORK vs SQL
May 05, 2011 06:27 PM|LINK
This is not really a valid question. There is no LINQ vs EF. LINQ is a framework for querying collections, which includes EF (LINQ to Entities), but also includes LINQ to SQL, LINQ to Objects, LINQ to XML, etc, etc
Entity Framework is an ORM framework for working with databases.
So the short answer is, you should study both.
anderson7777
Member
141 Points
280 Posts
Re: ADO.NET vs LINQ vs ENTITY FRAMEWORK vs SQL
May 05, 2011 06:31 PM|LINK
thx but it aint clear yet
i want to make an web-site
do i must know both?
or can i make it only with linq to sql?
tehremo
Star
10540 Points
1704 Posts
Re: ADO.NET vs LINQ vs ENTITY FRAMEWORK vs SQL
May 05, 2011 07:58 PM|LINK
I would say starting with LINQ to SQL is probably a good way to go. The learning curve there is much lower and will get you exposed to LINQ and how to query with it.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: ADO.NET vs LINQ vs ENTITY FRAMEWORK vs SQL
May 07, 2011 02:33 AM|LINK
1 - L2SQL is essentially obsolete
2 - L2SQL does not support POCO mapping, EF does.
3 - EF has more flexibility (code first, model first, database first). L2SQL has only 1.
4 - EF has support for SPROC -> POCO mapping
5 - EF has Entity-SQL, allowing you to go back to classic ADO.NET when required
6 - EF supports inheritance (TPT, TPH)
7 - EF goes hand-in-hand with Repository pattern, and deferred execution via IQueryable
8 - EF components (ObjectSet, ObjectContext) are easily mockable and allow for DI
Mikesdotnett...
All-Star
155597 Points
19981 Posts
Moderator
MVP
Re: ADO.NET vs LINQ vs ENTITY FRAMEWORK vs SQL
May 08, 2011 08:17 AM|LINK
Since you work for Microsoft, I assume that you represent Microsoft's actual position on Linq To SQL, and it is therefore Microsoft's official view that Linq To SQL is obselete?
That doesn't make much sense to me given that new things were added to Linq To Sql in the latest version of the framework (http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40/), and previously the ADO.NET team and Anders Hjelsberg have been categoric in their assertion that Linq To SQL is not dead.
Web Pages CMS | My Site | Twitter
tehremo
Star
10540 Points
1704 Posts
Re: ADO.NET vs LINQ vs ENTITY FRAMEWORK vs SQL
May 08, 2011 02:49 PM|LINK
I also don't agree with the statement "L2SQL is essentially obsolete".
I know there has been a ton of talk of LINQ to SQL being dead, its still a very useful technology. And in this case, where someone is trying to learn about LINQ and EF, LINQ to SQL is a great place to start, as its barrier to entry is much lower than EF.
Mikesdotnett...
All-Star
155597 Points
19981 Posts
Moderator
MVP
Re: ADO.NET vs LINQ vs ENTITY FRAMEWORK vs SQL
May 08, 2011 04:01 PM|LINK
It's clearly incorrect, which is why I asked Decker Dong to clarify exactly what he meant.
Web Pages CMS | My Site | Twitter
chohmann
Star
9385 Points
1644 Posts
Re: ADO.NET vs LINQ vs ENTITY FRAMEWORK vs SQL
May 08, 2011 08:23 PM|LINK
When did this happen? I was under the impression that Code First Stored Procedure support did not make it into Entity Framewrok 4.1 RTW. Here's a link to the article on the ADO.NET team blog which details what is and is not supported in EF 4.1.
http://blogs.msdn.com/b/adonet/archive/2011/04/11/ef-4-1-released.aspx
chohmann
Star
9385 Points
1644 Posts
Re: ADO.NET vs LINQ vs ENTITY FRAMEWORK vs SQL
May 08, 2011 08:32 PM|LINK
http://msormcodegen.codeplex.com/