Class NewsletterModelStore
SQL Server newsletter model store implementation. Manages persistence and retrieval of newsletter models from the database.
Implements
Inherited Members
Namespace: DataWeb.Newsletter.SqlServer
Assembly: DataWeb.Data.SqlServer.dll
Syntax
public class NewsletterModelStore : INewsletterModelStore
Constructors
NewsletterModelStore(ISqlHelper)
SQL Server newsletter model store implementation. Manages persistence and retrieval of newsletter models from the database.
Declaration
public NewsletterModelStore(ISqlHelper sqlHelper)
Parameters
| Type | Name | Description |
|---|---|---|
| ISqlHelper | sqlHelper |
Properties
Name
Gets the name of the newsletter model store.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetModelAsync(NewsletterModelFilter, CancellationToken)
Retrieves a single newsletter model based on the specified filter criteria.
Declaration
public Task<NewsletterModel> GetModelAsync(NewsletterModelFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| NewsletterModelFilter | filter | Search criteria. Cannot be null. |
| CancellationToken | cancellationToken | Token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<NewsletterModel> | The newsletter model found, or null if not found. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If filter is null. |
GetModelsAsync(NewsletterModelFilter, CancellationToken)
Retrieves a collection of newsletter models based on the specified filters.
Declaration
public Task<IEnumerable<NewsletterModel>> GetModelsAsync(NewsletterModelFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| NewsletterModelFilter | filter | Search criteria. Cannot be null. |
| CancellationToken | cancellationToken | Token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<NewsletterModel>> | Collection of newsletter models matching the filter criteria. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If filter is null. |