c# - List Filtering in Linq -


i have 2 lists. 1 list of ids. i've filter second list having ids in former list only. that, i've written below code

var clientidlist = list.groupby(p => new {p.companyname, p.userid})                  .select(s => s.min(m => m.id));  var olist = list.where(x => clientidlist.contains(x.id))                  .orderby(x=>x.companyname).tolist(); 

but think there wrong in it. can me?


Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -