开发者

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜