public void UpdateGroups(IEnumerable <Group> groups) { var groupsA = groups.ToArray(); Groups.AttachAll(groupsA); foreach (var g in groupsA) { UpdateSets(g.Sets); } }