Class MultitenantRoleStore<TRole, TContext>
Represents a new instance of a persistence store for the specified role types.
Inheritance
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid>
MultitenantRoleStore<TRole, TContext>
Inherited Members
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.CreateAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.UpdateAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.DeleteAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.GetRoleNameAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.SetRoleNameAsync(TRole, System.String, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.ConvertIdFromString(System.String)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.ConvertIdToString(System.Guid)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.FindByIdAsync(System.String, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.GetNormalizedRoleNameAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.SetNormalizedRoleNameAsync(TRole, System.String, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.ThrowIfDisposed()
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.Dispose()
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.GetClaimsAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.AddClaimAsync(TRole, System.Security.Claims.Claim, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.Context
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.ErrorDescriber
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.AutoSaveChanges
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.Roles
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: IRM.AspNetCore.Identity.EntityFrameworkCore.dll
Syntax
public class MultitenantRoleStore<TRole, TContext> : RoleStore<TRole, TContext>, IQueryableRoleStore<TRole>, IRoleClaimStore<TRole>, IRoleStore<TRole>, IRoleStore<TRole>, IPermissionStore, IMultitenantRoleStore<TRole>, IRoleStore<TRole>, IRoleStore<TRole>, IDisposable where TRole : MultitenantRole where TContext : DbContext
Type Parameters
TRole
The type of the class representing a role.
|
TContext
The type of the data context class used to access the store.
|
Constructors
Declaration
public MultitenantRoleStore(TContext context, ITenantAccessor tenantAccessor, ILogger<MultitenantRoleStore<TRole, TContext>> logger, IdentityErrorDescriber describer = null)
Parameters
TContext
context
The context used to access the store.
|
ITenantAccessor
tenantAccessor
The accessor used to access the identity of the current tenant.
|
Microsoft.Extensions.Logging.ILogger<MultitenantRoleStore<TRole, TContext>>
logger
The logger used to log messages, warnings and errors.
|
Microsoft.AspNetCore.Identity.IdentityErrorDescriber
describer
The Microsoft.AspNetCore.Identity.IdentityErrorDescriber used to describe store errors.
|
Methods
Creates a new role in a store as an asynchronous operation.
Declaration
public override Task<IdentityResult> CreateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken))
Parameters
TRole
role
The role to create in the store.
|
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
|
Returns
Overrides
Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext, System.Guid, Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>, Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>.CreateAsync(TRole, System.Threading.CancellationToken)
Implements
Microsoft.AspNetCore.Identity.IRoleStore<TRole>.CreateAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.IRoleStore<TRole>.CreateAsync(TRole, System.Threading.CancellationToken)
Gets all roles for the specified tenant.
Declaration
public override Task<QueryResult<TRole>> GetAllAsync(RolesSearchQuery query, CancellationToken cancellationToken = default(CancellationToken))
Parameters
RolesSearchQuery
query
The query describing filtering and sorting for the roles.
|
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
|
Returns
System.Threading.Tasks.Task<QueryResult<TRole>>
A System.Threading.Tasks.Task that represents the QueryResult<T> of the asynchronous query.
|
Overrides
IRM.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext>.GetAllAsync(IRM.AspNetCore.Identity.RolesSearchQuery, System.Threading.CancellationToken)
Implements
Gets a role with default includes for this store implementation.
Declaration
protected override Task<TRole> GetRoleAsync(Expression<Func<TRole, bool>> predicate, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Expression<System.Func<TRole, Boolean>>
predicate
A function to test each element for a condition.
|
System.Threading.CancellationToken
cancellationToken
A System.Threading.CancellationToken to observe while waiting for the task to complete.
|
Returns
System.Threading.Tasks.Task<TRole>
A task that represents the asynchronous operation.
|
Overrides
IRM.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, TContext>.GetRoleAsync(System.Linq.Expressions.Expression<System.Func<TRole, System.Boolean>>, System.Threading.CancellationToken)