Click here to Skip to main content
15,672,517 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I would like to Learn Mvc. so i just Google basic Registration Form .i got Result More Related to Accessing Sql server Through Entity Framework and LINQ to Sql .so i got Confused which one is Best and Which is powerful .
what is the Difference Of Both ?

Guid me,
Updated 2-Nov-14 5:14am

Share this answer
Afzaal Ahmad Zeeshan 2-Nov-14 11:28am    
Right, or the user can himself try to check for the comparison. Mostly the developers are tensed or depressed about the effieciency and the speed of the code. He might also be talking about the speed of the code execution. To test the better code (according to the speed of its execution) he can run each code 100 times and calculate their mean time of code execution. Check against both values, and the code with less value will win. :-)
CHill60 2-Nov-14 11:44am    
I don't think it's implied that he was looking at performance ("powerful" != "performant"). The posts I supplied cover most of the differences - in particular the last one which discusses the future of LinqToSql
Santosh K. Tripathi 12-Mar-15 1:02am    
i agree with chill60.
"powerful" != "performant"
Manas Bhardwaj 2-Nov-14 12:51pm    
Yes +5!
This is a broad topic and you might want to Google the topic for some related articles or blog posts.

Here are a few posts.[^]

Tabular form of difference,[^]

On Stack Overflow,[^]

Best Method

But a better idea is to always test the code yourself. You can use the Stopwatch class of the .NET framework, ([^]) and then run both codes, run the EF and also the LINQ code to get the data.

Run them with a loop of 100 times, calculate their time. The code that takes less time will be better one. :-)
Share this answer
Manas Bhardwaj 2-Nov-14 12:51pm    
Agree +5!
Afzaal Ahmad Zeeshan 2-Nov-14 13:01pm    
Thanks a lot Manas.
I personally would go ahead with Entity Framework. There has been much improvement and support for Linq to SQL recently and that is usually one of the sign that Microsoft is not going ahead and investing much in that technology or product.

Having said that look at this article as well:[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900