dimanche 1 juin 2014

Group By Multiple Properties LINQ


Vote count:

0




I have a linq statement to find duplicates


Dim duplicates = svgGrpContainer.GroupBy(Function(x) x.ServiceGroup).Where(Function(x) x.Count > 1).Select(Function(x) x)


Right now I am finding duplicates base on "ServiceGroup". I want to instead find duplicates based on "ServiceGroup" then group the duplicates by "Name". I only want records where "TheFlag" = 'Y'


If more than 1 record has the same "ServiceGroup","Name", and "TheFlag"='Y'. Then I want to set all of those records in the svgGrpContainer property "IsCompositeSeg"=True


I am struggling to find a way to expand on my duplicate query to accomidate this



asked 34 secs ago






Aucun commentaire:

Enregistrer un commentaire