Reputation: 2881
I have a call to my database in my c# code that looks like this:
var filter = new PrioritizeSessionFilter()
.Add(DbTable.PrioritizeSession.Columns.IsArchived, Comp.Equals, false);
var list = UnitOfWork.PrioritizeSessions.Query(filter);
Is there a way I can only return 10 items at a time instead of all of them at once? Is there a filter I could possibly create to do this?
Upvotes: 1
Views: 115
Reputation: 33823
While walkhard is correct, you should generally use skip when using take so that if you need a different ten items, you can return those as well
var amyList = UnitOfWork.PrioritizeSessions.Query(filter).Skip(skip).Take(10).ToList();
Upvotes: 1