Entity Framework - Performance in count

后端 未结 5 753
清歌不尽
清歌不尽 2021-01-11 10:49

I\'ve a little question about performance with Entity Framework.

Something like

using (MyContext context = new MyContext())
{
    Document DocObject         


        
5条回答
  •  生来不讨喜
    2021-01-11 11:30

    Using the extension method Enumerable.ToList() will construct a new List object from the IEnumerable source collection which means that there is an associated cost with doing ToList().

提交回复
热议问题