Linq To Entities – how to filter on child entities

There is no “nice” way of doing this, but you could try this – project both, Group and filtered Users onto an anonymous object, and then Select just the Groups: var resultObjectList = AllGroups. Select(g => new { GroupItem = g, UserItems = g.Users.Where(u => !u.IsInactive) }).ToList(); FilteredGroups = resultObjectList.Select(i => i.GroupItem).ToList(); This isn’t a … Read more