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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -