6 references to Roles
Microsoft.AspNetCore.Identity.InMemory.Test (6)
InMemoryStore.cs (6)
23
user.
Roles
.Add(new PocoUserRole { RoleId = roleEntity.Id, UserId = user.Id });
32
var roleEntity = user.
Roles
.SingleOrDefault(ur => ur.RoleId == roleObject.Id);
35
user.
Roles
.Remove(roleEntity);
43
foreach (var r in user.
Roles
.Select(ur => ur.RoleId))
53
bool result = roleObject != null && user.
Roles
.Any(ur => ur.RoleId == roleObject.Id);
67
return Task.FromResult<IList<TUser>>(Users.Where(u => (u.
Roles
.Where(x => x.RoleId == role.Id).Any())).Select(x => x).ToList());