Interface IOrganisationStore<TOrganisation>
Provides an abstraction for a store which manages organisations in a multi-tenant environment.
Inherited Members
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public interface IOrganisationStore<TOrganisation> : IDisposable, IUseExecutionStrategy where TOrganisation : class, IOrganisation
Type Parameters
TOrganisation
The type encapsulating a tenant. |
Methods
CreateAsync(TOrganisation, CancellationToken)
Creates the specified organisation
in the organisation store.
Declaration
Task<IdentityResult> CreateAsync(TOrganisation organisation, CancellationToken cancellationToken = default(CancellationToken))
Parameters
TOrganisation
organisation
The organisation 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(TOrganisation, CancellationToken)
Deletes an organisation from the store as an asynchronous operation.
Declaration
Task<IdentityResult> DeleteAsync(TOrganisation organisation, CancellationToken cancellationToken = default(CancellationToken))
Parameters
TOrganisation
organisation
The organisation to delete from 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<TResult> that represents the IdentityResult of the asynchronous query. |
FindByIdsAsync(Guid[], CancellationToken)
Finds and returns a list of organisations, if any, who has any of the specified organisationIds
.
Declaration
Task<List<TOrganisation>> FindByIdsAsync(Guid[] organisationIds, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Guid[]
organisationIds
The organisation 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<List<TOrganisation>>
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the tenants matching the specified |
FindByNameAsync(String, Nullable<Guid>, CancellationToken)
Gets the organisation, if any, associated with the specified name.
Declaration
Task<TOrganisation> FindByNameAsync(string organisationName, Guid? groupMotherId = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
String
organisationName
The organisation name to search for. |
System.Nullable<System.Guid>
groupMotherId
Specifies optional organisation to search within |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task<TOrganisation>
The task object containing the results of the asynchronous lookup operation, the organisation if any associated with the specified organisation name. |
FindByTrustedDomainAsync(String, CancellationToken)
Gets the organisation keys, if any, associated with the specified domain name.
Declaration
Task<OrganisationKeys> FindByTrustedDomainAsync(string normalizedDomainName, CancellationToken cancellationToken = default(CancellationToken))
Parameters
String
normalizedDomainName
The organisation name 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<OrganisationKeys>
The task object containing the results of the asynchronous lookup operation, the organisation keys if any associated with the specified organisation name. |
GetAllAsync(OrganisationSearchQuery, CancellationToken)
Gets all organisations matching the query
.
Declaration
Task<QueryResult<TOrganisation>> GetAllAsync(OrganisationSearchQuery query, CancellationToken cancellationToken = default(CancellationToken))
Parameters
OrganisationSearchQuery
query
The query describing filtering and sorting for the organisations. |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task<QueryResult<TOrganisation>>
A System.Threading.Tasks.Task that represents the QueryResult<T> of the asynchronous query. |
GetAllTrustedDomainsAsync(CancellationToken)
Gets a list of all trusted domain that have been registered.
Declaration
Task<List<TrustedDomainMatch>> GetAllTrustedDomainsAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task<List<TrustedDomainMatch>>
The task object containing the results of the asynchronous operation, the list of all trusted domains. |
UpdateAsync(TOrganisation, CancellationToken)
Updates a organisation in a store as an asynchronous operation.
Declaration
Task<IdentityResult> UpdateAsync(TOrganisation organisation, CancellationToken cancellationToken = default(CancellationToken))
Parameters
TOrganisation
organisation
The organisation to update 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>
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the IdentityResult for the update. |