Linq Orderby random ThreadSafe for use in ASP.NET

前端 未结 5 1916
春和景丽
春和景丽 2020-11-29 05:23

i\'m using Asp.net MVC with Sharp Architecture.

I have this code:

return _repositoryKeyWord.FindAll(x => x.Category.Id == idCAtegory)
                     


        
5条回答
  •  被撕碎了的回忆
    2020-11-29 06:11

    You can do this in T-Sql as described here. I don't think you can do it in linq without loading the whole result set into memory and then throwing most of it away, which you do not want to do.

提交回复
热议问题