EntityFramework & RowNumber
Posted
by Dan
on Stack Overflow
See other posts from Stack Overflow
or by Dan
Published on 2010-04-07T15:11:42Z
Indexed on
2010/04/07
15:13 UTC
Read the original article
Hit count: 264
entity-framework
|rownumber
Hello.
How can I query RowNumber with Entity Framework? For example:
var result = data.Users
.OrderByDescending("Birthday")
.ThenBy("LastName")
.ThenBy("FirstName")
.Select(u =>
{
RowNumber = ???,
u.FirstName,
u.LastName
});
I want to implement paging for my grid, but I cannot solve problem with finding page with needed user.
I'm using EF4.0. Select method with index(http://msdn.microsoft.com/en-us/vcsharp/aa336758.aspx#SelectIndexed) not works with EF.
May be there is another way to implement this?
© Stack Overflow or respective owner