Class TermsApprovalStore
Manages terms approval records in SQL Server.
Implements
Inherited Members
Namespace: DataWeb.Terms.SqlServer
Assembly: DataWeb.Data.SqlServer.dll
Syntax
public class TermsApprovalStore : ITermsApprovalStore
Constructors
TermsApprovalStore(ISqlHelper)
Manages terms approval records in SQL Server.
Declaration
public TermsApprovalStore(ISqlHelper sqlHelper)
Parameters
| Type | Name | Description |
|---|---|---|
| ISqlHelper | sqlHelper |
Properties
Name
Gets the name of the store provider.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
ExistsAsync(TermsApprovalFilter, CancellationToken)
Determines whether any terms approval matching the specified filter criteria exists.
Declaration
public 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. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when filter is null. |
GetTermsApprovalAsync(TermsApprovalFilter, CancellationToken)
Retrieves a single terms approval matching the specified filter criteria.
Declaration
public Task<TermsApproval> GetTermsApprovalAsync(TermsApprovalFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TermsApprovalFilter | filter | The filter criteria for the terms approval. |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<TermsApproval> | The first terms approval matching the filter, or null if no match found. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when filter is null. |
GetTermsApprovalsAsync(TermsApprovalFilter, CancellationToken)
Retrieves terms approvals matching the specified filter criteria.
Declaration
public Task<IEnumerable<TermsApproval>> GetTermsApprovalsAsync(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<IEnumerable<TermsApproval>> | A collection of terms approvals matching the filter. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when filter is null. |
SetAsync(TermsApproval, CancellationToken)
Creates a new terms approval record.
Declaration
public Task SetAsync(TermsApproval termsApproval, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TermsApproval | termsApproval | The terms approval to create. |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when termsApproval is null. |