Show / Hide Table of Contents

Class MultitenantRoleStore<TRole, TContext>

Represents a new instance of a persistence store for the specified role types.

Inheritance
Object
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>
RoleStore<TRole, TContext>
MultitenantRoleStore<TRole, TContext>
Inherited Members
RoleStore<TRole, TContext>.FindByNameAsync(String, CancellationToken)
RoleStore<TRole, TContext>.FindByIdAsync(String, CancellationToken)
RoleStore<TRole, TContext>.DeleteAsync(TRole, CancellationToken)
RoleStore<TRole, TContext>.GetRoleAsync(Expression<Func<TRole, Boolean>>, CancellationToken)
RoleStore<TRole, TContext>.GetUserRolesAsync(Guid, CancellationToken)
RoleStore<TRole, TContext>.GetAllAsync(RolesSearchQuery, CancellationToken)
RoleStore<TRole, TContext>.IPermissionStore.GetRemovePermissionSql(String[], Guid[])
RoleStore<TRole, TContext>.AddSearchTerms(IQueryable<TRole>, RolesSearchQuery)
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)
RoleStore<TRole, TContext, Guid, IdentityUserRole<Guid>, IdentityRoleClaim<Guid>>.GetRoleIdAsync(TRole, 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)
RoleStore<TRole, TContext, Guid, IdentityUserRole<Guid>, IdentityRoleClaim<Guid>>.FindByNameAsync(String, 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)
RoleStore<TRole, TContext, Guid, IdentityUserRole<Guid>, IdentityRoleClaim<Guid>>.RemoveClaimAsync(TRole, Claim, CancellationToken)
RoleStore<TRole, TContext, Guid, IdentityUserRole<Guid>, IdentityRoleClaim<Guid>>.CreateRoleClaim(TRole, Claim)
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
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Identity.EntityFrameworkCore
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

MultitenantRoleStore(TContext, ITenantAccessor, ILogger<MultitenantRoleStore<TRole, TContext>>, IdentityErrorDescriber)

Creates a new instance of RoleStore<TRole, TContext>.

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

CreateAsync(TRole, CancellationToken)

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
System.Threading.Tasks.Task<IdentityResult>

A System.Threading.Tasks.Task that represents the IdentityResult of the asynchronous query.

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)

GetAllAsync(RolesSearchQuery, 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
IRoleStore<TRole>.GetAllAsync(RolesSearchQuery, CancellationToken)
IRoleStore<TRole>.GetAllAsync(RolesSearchQuery, CancellationToken)

GetRoleAsync(Expression<Func<TRole, Boolean>>, CancellationToken)

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)
Back to top Generated by DocFX