GridView sorting and paging Entity Framework with calculated field
问题 I am paging and sorting a GridView which uses ObjectDataSource . The ObjectDataSource gets data from a List in my business layer, and this List is populated by an IEnumerable<Type> in my data layer which uses the Entity Framework. The guts of the paging and sorting is done in the data layer, as follows: var customers = (from c in entities.Customers select c).OrderBy(sortParameter).Skip(startRowIndex).Take(maximumRows)); As you can see, I am passing parameters from the ObjectDataSource to