Can we control LINQ expression order with Skip(), Take() and OrderBy()

后端 未结 6 768
日久生厌
日久生厌 2021-02-08 14:16

I\'m using LINQ to Entities to display paged results. But I\'m having issues with the combination of Skip(), Take() and OrderBy() calls.

6条回答
  •  误落风尘
    2021-02-08 14:53

    I haven't worked directly with Linq to Entities, but it should have a way to hook specific stored procedures into certain locations when needed. (Linq to SQL did.) If so, you could turn this query into a stored procedure, doing exacly what is required, and doing it efficiently.

提交回复
热议问题