Mid LINQ

Find duplicate departments?

Find duplicate departments

var duplicateDepts = employees

Follow :

.GroupBy(e => e.Department)

.Where(g => g.Count() > 1)

.Select(g => g.Key);

More from LINQ Tutorial

All questions for this course