Interface ITermsApprovalStore
Interface for storing and retrieving Terms Approvals
Namespace: DataWeb.Terms
Assembly: DataWeb.Core.dll
Syntax
public interface ITermsApprovalStore
Properties
Name
The name of the store
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
ExistsAsync(TermsApprovalFilter, CancellationToken)
Determines whether any Terms Approval matching the provided filter exists.
Declaration
Task<bool> ExistsAsync(TermsApprovalFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TermsApprovalFilter | filter | The filter criteria for Terms Approvals. |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<bool> | true if at least one matching record exists; otherwise, false. |
GetTermsApprovalAsync(TermsApprovalFilter, CancellationToken)
Retrieves a single Terms Approval matching the provided filter
Declaration
Task<TermsApproval> GetTermsApprovalAsync(TermsApprovalFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TermsApprovalFilter | filter | The filter to apply when retrieving the Terms Approval |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<TermsApproval> | A single Terms Approval, or null if no match is found. |
GetTermsApprovalsAsync(TermsApprovalFilter, CancellationToken)
Retrieves a collection of Terms Approvals matching the provided filter
Declaration
Task<IEnumerable<TermsApproval>> GetTermsApprovalsAsync(TermsApprovalFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TermsApprovalFilter | filter | The filter to apply when retrieving Terms Approvals |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<TermsApproval>> | A collection of Terms Approvals |
SetAsync(TermsApproval, CancellationToken)
Saves a new or updated Terms Approval
Declaration
Task SetAsync(TermsApproval termsApproval, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TermsApproval | termsApproval | The Terms Approval to save |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |