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