asp.net mvc - LINQ - UNION - remove duplicated based on a single column -
i have linq query want remove duplicates based on column mailadr (but keep other columns):
dim dataobject = (from in db.table1 select new { .id = a.benutzernr, .mailadr = a.email, .benutzergrp = a.usrgrp }) _ .union( (from b in db.table12 select new { .id = b.id, .mailadr = b.mailadr, .benutzergrp = b.benutzergrp }) _ )
you can provide comparison method (iequalitycomparer) on overloaded union method.
Comments
Post a Comment