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?
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With