c# - How would I grab the first 10 unique items from my database -
i'm using unitofwork function items db this:
var items = unitofwork.conversationposts.query(postfilter).take(10);
however, there way first 10 unique items? tried using linq function don't know how use properly:
var items= unitofwork.conversationposts.query(postfilter).take(10).where(x =>x.id ___);
var items = unitofwork.conversationposts .query(postfilter) .groupby(c => c.id) .select(d => d.first()) .take(10);
Comments
Post a Comment