Reputation: 7311
I'm trying to load data as follows-
var outletList = (from c in db.OutletList
where c.EmployeeId == 1
orderby c.VisitId descending select c).Take(10).Skip(skipQuantity);
int quantity = outletList.Count(); // it's zero
No data is being loaded. I'm new to Entity Framework, so, sorry if it is a foolish question.
Any help?
Upvotes: 3
Views: 9475
Reputation: 18137
You should first Skip
from the whole collection and after that Take
.
var outletList = (from c in db.OutletList
where c.EmployeeId == 1
orderby c.VisitId descending select c)
.Skip(skipQuantity).Take(10);
Upvotes: 9