public static List <Role> GetRolesForUser(string email) { using (EntityContext ctx = new EntityContext()) { User u = User.GetByEmail(email); List <int> userRoles = ctx.UserRoles.Where(ur => ur.UserId.Equals(u.UserId)).Select(ur => ur.RoleId).ToList(); return(ctx.Roles.Where(r => userRoles.Contains(r.RoleId)).ToList()); } }