LINQ contains exactly matching
LINQ contains exactly matching We have the following class structure and want to query all user who has at least all roles or more from the mustHaveRole Queryparameter. If someone has a good idea that would be cool :-) public class User { public Guid UserId { get; set; } public string Username { get; set; } public ICollection<UserRole> Roles { get; set; } = new HashSet<UserRole>(); } public class UserRole { public virtual User User { get; set; } public Guid UserId { get; set; } public virtual Role Role { get; set; } public Guid RoleId { get; set; } } public class Role { public Guid RoleId { get; set; } public string RoleName { get; set; } public ICollection<User> Users { get; set; } = new HashSet<User>(); } public class QueryHandler { readonly List<User> Users = new List<User>(); public IEnumerable<User> Handle(List<Guid> musthaveRoles) { var queryResult = from u in U...