Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var roles = User.FindAll(ClaimTypes.Role).Select(r=>r.Value);
- var groupsQuery = dbContext.Groups.Where(g=>roles.Any(r=>r==g.GroupName));
- var groups = await groupsQuery.ToListAsync();
- var assetGroupsQuery = dbContext.AssetsGroups.Where(ag => groupsQuery.Any(ag => ag.Id == a.GroupId));
- var assetGroups = await assetGroupsQuery.ToListAsync();
- The LINQ expression 'where ([ag].Id == [ag].GroupId)' could not be translated and will be evaluated locally.
- The LINQ expression 'Any()' could not be translated and will be evaluated locally.
- The LINQ expression 'where {from Group g in __groups_0 where ([ag].Id == [ag].GroupId) select [ag] => Any()}' could not be translated and will be evaluated locally.
- The LINQ expression 'where ([ag].Id == [ag].GroupId)' could not be translated and will be evaluated locally.
- The LINQ expression 'Any()' could not be translated and will be evaluated locally.
Add Comment
Please, Sign In to add comment