Why LINQ 2 sql gives better perfomance?
I read in some article that LINQ to SQL gives better开发者_运维问答 performance when executing stored procedure than Entity framework. Any obvious reasons for it?
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)
精彩评论