AugusteVN.Modules.EmailCampaigns.Domain 1.0.7

dotnet add package AugusteVN.Modules.EmailCampaigns.Domain --version 1.0.7
                    
NuGet\Install-Package AugusteVN.Modules.EmailCampaigns.Domain -Version 1.0.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AugusteVN.Modules.EmailCampaigns.Domain" Version="1.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AugusteVN.Modules.EmailCampaigns.Domain" Version="1.0.7" />
                    
Directory.Packages.props
<PackageReference Include="AugusteVN.Modules.EmailCampaigns.Domain" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AugusteVN.Modules.EmailCampaigns.Domain --version 1.0.7
                    
#r "nuget: AugusteVN.Modules.EmailCampaigns.Domain, 1.0.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AugusteVN.Modules.EmailCampaigns.Domain@1.0.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AugusteVN.Modules.EmailCampaigns.Domain&version=1.0.7
                    
Install as a Cake Addin
#tool nuget:?package=AugusteVN.Modules.EmailCampaigns.Domain&version=1.0.7
                    
Install as a Cake Tool

AugusteVN.Modules.EmailCampaigns.Domain

Domain entities and provider-agnostic interfaces for email campaigns — defines the IEmailCampaignsDbContext contract and all entity types used by both the EfCore and MongoDB persistence layers.

Entities

EmailCampaign (extends AuditableEntity)

Property Type Default Description
Id Guid Primary key
Title string Campaign display title
Description string Campaign description
Status string EmailCampaignStatuses.NotActive Campaign lifecycle status
EmailTemplates IList<EmailTemplate> Navigation: templates in this campaign
TargetEmailList EmailLists EmailLists.All Target subscriber lists (flags)
StartsAt DateTime DateTime.Today Scheduled start date

EmailTemplate (extends AuditableEntity)

Property Type Default Description
Id Guid Primary key
Subject string Email subject line
BodyAsMarkdown string Email body in Markdown
BodyAsHtml string Rendered HTML body
SendDelayInDays int Days to delay after trigger event
EmailCampaignId Guid? null FK to parent campaign (null for standalone)
Status string EmailTemplateStatuses.NotActive Template lifecycle status
Trigger string EmailTemplateTriggers.Subscribed When the template is sent

EmailSubscriber (extends AuditableEntity)

Property Type Default Description
Id Guid Primary key
Email string Subscriber email address
IsSubscribed bool Active subscription flag
IsEmailConfirmed bool Email confirmation flag
IsTester bool Test subscriber flag
EmailLists EmailLists EmailLists.All Per-category list memberships (flags)

SentEmail (extends AuditableEntity)

Property Type Description
Id Guid Primary key
To string Recipient email address
IsSuccess bool Whether the email was sent successfully
ExceptionMessage string? Error details if send failed
EmailTemplateId Guid FK to the template used
EmailCampaignId Guid? FK to the campaign (if part of one)
TraceId Guid Unique trace ID for metric correlation
EmailJobId Guid? FK to the job (if triggered by one)

SentEmailMetric (extends AuditableEntity)

Property Type Description
Id Guid Primary key
SentEmailId Guid FK to the sent email
Type string Metric type (EMAIL_READ, LINK_CLICKED, ...)
EmailTemplateId Guid FK to the template
EmailCampaignId Guid? FK to the campaign
TraceId Guid Trace ID matching the sent email
EmailJobId Guid? FK to the job

EmailJob (extends AuditableEntity)

Property Type Default Description
Id Guid Primary key
TargetEmailList EmailLists Target subscriber lists (flags)
StartsAt DateTime DateTime.Today Scheduled send date
Status string Job lifecycle status
EmailTemplateId Guid FK to the template to send
EmailTemplate EmailTemplate Navigation: template
PublishAsBlogPost bool Publish email content as a blog post
PostType string? Blog post type when publishing
IncludeSponsorSegment bool Include sponsor content in the email

Interface

IEmailCampaignsDbContext

public interface IEmailCampaignsDbContext
{
    IGenericRepository<EmailCampaign> EmailCampaigns { get; }
    IGenericRepository<EmailTemplate> EmailTemplates { get; }
    IGenericRepository<SentEmail> SentEmails { get; }
    IGenericRepository<SentEmailMetric> SentEmailMetrics { get; }
    IGenericRepository<EmailSubscriber> EmailSubscribers { get; }
    IGenericRepository<EmailJob> EmailJobs { get; }
    Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}

Provider-agnostic contract implemented by both EmailCampaignsEfCoreDbContext and EmailCampaignsMongoDbContext.

Extension Methods

SaveSentEmailAsync

public static async Task SaveSentEmailAsync(this IEmailCampaignsDbContext context, SentEmail email)

Helper to persist a new SentEmail record.

DeactivateEmailJob

public static async Task DeactivateEmailJob(this IEmailCampaignsDbContext context, EmailJob emailJob)

Sets a job's status to NotActive and persists the change.

Dependencies

  • AugusteVN._Shared.Contracts
  • AugusteVN.Database.Entities
  • AugusteVN.Modules.EmailCampaigns._Shared

Installation

dotnet add package AugusteVN.Modules.EmailCampaigns.Domain

Full Documentation

See the EmailCampaigns Module README for complete documentation.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on AugusteVN.Modules.EmailCampaigns.Domain:

Package Downloads
AugusteVN.Modules.EmailCampaigns.Database.EfCore

EF Core DbContext and entities for email campaigns

AugusteVN.Modules.EmailCampaigns.Features

CQRS handlers for email campaign operations

AugusteVN.Modules.EmailCampaigns.Database.Mongo

MongoDB persistence layer for email campaigns

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.7 111 8/9/2026
1.0.6 110 8/9/2026
1.0.2 116 8/8/2026
1.0.1 110 8/8/2026
1.0.0 113 8/8/2026