views:

72

answers:

3

Why should we use LINQtoSQL when ADO.NET is giving us better performance? Checkout this link which shows the comparison reports

I am looking for Speed /Performance of my application rather than deployment easiness. Is there anything else which should we considered before i leave LINQ to SQL and go back to my OLD ADO.NET DataAcces Layer which user stored procedures ?

+1  A: 

How often do you execute 2000 identical queries? This is a purely synthetic test which does not show a thing.

Generally speaking, it's much easier (and cost-effective) to throw more hardware at a problem (add more dirt-cheap RAM to an SQL Server machine) than to spend thousands of dollars and hundreds of man-hours trying to eliminate all bugs in

var dataReader = command.ExecuteReader();
while(dataReader.Read())
    var id = dataReader.GetInt32("ID");

Granted, sometimes one needs to resort to plain ADO.NET to increase performance, but this should be done only where profiler shows a problem.

Anton Gogolev
@Shyju: Define "sucks".
Anton Gogolev
@Anton : Sorry,if the word used was wrong. I meant to say that it was not working fast
Shyju
A: 

IMO ORM is so good for a project which is not distributed. Sometimes your client use shared server or different database server that is even in the another country. In this case, I'm using SP. But ORM has another benefit. For instance, When you change the table structure, in SP, you've to change all of dependent SP. But in ORM, everything is ok after a few changes.

Mehdi Golchin
+1  A: 

One of an ORMs biggest advantages over ADO.NET is in initial development speed (not application speed). Maintenance can also be much easier with an ORM than with ADO.NET. ORMs offer many features that would need to be coded by hand with ADO.NET. Linq does not work with ADO.NET and Linq currently requires an ORM.

Most ORMs allow you to drop down to SQL/ADO.NET when necessary for performance reasons.

How you choose to implement your data layer should completely depend on your requirements and the answer to that question is always situational. It's not possible to say ORMs are always superior to ADO.NET or vice versa.

Michael Maddox