I read in some article that LINQ to SQL gives better performance when executing stored procedure than Entity framework. Any obvious reasons for it?
Asked
Active
Viewed 124 times
1
-
1Do you have a **link** to that article?? – marc_s Apr 28 '10 at 05:15
-
Duplicate? - http://stackoverflow.com/questions/257016/linq-to-sql-vs-entity-framework-performance – Bermo Apr 28 '10 at 05:56
-
No this isn't a duplicate, the other article discusses general Entity Framework versus Linq to sql, not specific the stored procedure performance. – JJoos Apr 28 '10 at 09:12
-
yes.. this is specific to the execution of stored procedures. I do not have that link with me now. It was some whrere in the comparison. – Shetty Apr 28 '10 at 09:23
1 Answers
0
There could be a performance difference, in L2S you can make your sproc return a list of l2s objects which are going to be tracked for changes. For large result sets this could be a severe performance hit, if you're not going to change these objects.
I don't know how Entity Framework handles these kind of situations.
In L2S you can also turn this behaviour off in your datacontext. (ObjectTrackingEnabled = false)

JJoos
- 587
- 1
- 6
- 17