Interface IPersonStore<TPerson>
Provides an abstraction for a store which manages persons.
Inherited Members
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public interface IPersonStore<TPerson> : IDisposable, IUseExecutionStrategy where TPerson : class, IPerson
Type Parameters
TPerson
The type encapsulating a person. |
Methods
CreateAsync(TPerson, CancellationToken)
Creates the specified person
in the person store.
Declaration
Task<IdentityResult> CreateAsync(TPerson person, CancellationToken cancellationToken = default(CancellationToken))
Parameters
TPerson
person
The person to create. |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task<IdentityResult>
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the IdentityResult of the creation operation. |
DeleteAsync(TPerson, CancellationToken)
Deletes the specified person
in the person store.
Declaration
Task<IdentityResult> DeleteAsync(TPerson person, CancellationToken cancellationToken = default(CancellationToken))
Parameters
TPerson
person
The person to delete. |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task<IdentityResult>
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the IdentityResult of the deletion operation. |
FindByIdAsync(Guid, CancellationToken)
Finds and returns a person, if any, who has the specified personId
.
Declaration
Task<TPerson> FindByIdAsync(Guid personId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Guid
personId
The person ID to search for. |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task<TPerson>
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the person matching the specified |
UpdateAsync(TPerson, CancellationToken)
Updates the specified person
in the person store.
Declaration
Task<IdentityResult> UpdateAsync(TPerson person, CancellationToken cancellationToken = default(CancellationToken))
Parameters
TPerson
person
The person to update. |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task<IdentityResult>
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the IdentityResult of the update operation. |