How do I add ROW_NUMBER to a LINQ query or Entity?
How can I convert this solution to VB.NET?
var start = page * rowsPerPage;
Products.OrderByDescending(u => u.Sales.Count())
.Skip(start)
.Take(rowsPerPage)
.AsEnumerable()
.Select((u, index) => new { Product = u, Index = index + start }); // this line gets me
I'm having trouble porting that last line. I have been unable to locate a VB.NET example.
I'm actually not looking for any paging functionality like the example provides, just good old-fashioned Row_Number(Order By X)
row index.