Error adding dynamic data to an existing site - Skip is supported only for sorted input in LINQ to Entities. "OrderBy" must be called before "Skip"

I am creating an ASP.NET website that will support dynamic data. When I create a dynamic website from scratch (from a template in VS), everything works fine. But when I try to add a dynamic entity ( .edmx) file and run the application, I get the following error:

The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'.

How to prevent this error?

+3
source share
2 answers

- ​​ , . OrderBy , Skip Take .

var foo = from e in MyEntities.SomeEntity.OrderBy(x=>x.SomeProperty).Skip(100);
0

... , , DynamicData , LinqtoSQL , DynamicData, LinqToEntity, DynamicData.

..

0

Source: https://habr.com/ru/post/1740920/


All Articles