AugusteVN.Modules.Sponsorships.Database
1.0.9
dotnet add package AugusteVN.Modules.Sponsorships.Database --version 1.0.9
NuGet\Install-Package AugusteVN.Modules.Sponsorships.Database -Version 1.0.9
<PackageReference Include="AugusteVN.Modules.Sponsorships.Database" Version="1.0.9" />
<PackageVersion Include="AugusteVN.Modules.Sponsorships.Database" Version="1.0.9" />
<PackageReference Include="AugusteVN.Modules.Sponsorships.Database" />
paket add AugusteVN.Modules.Sponsorships.Database --version 1.0.9
#r "nuget: AugusteVN.Modules.Sponsorships.Database, 1.0.9"
#:package AugusteVN.Modules.Sponsorships.Database@1.0.9
#addin nuget:?package=AugusteVN.Modules.Sponsorships.Database&version=1.0.9
#tool nuget:?package=AugusteVN.Modules.Sponsorships.Database&version=1.0.9
AugusteVN.Modules.Sponsorships.Database
Entity Framework Core DbContext, entity definitions, and migrations for the Sponsorships module.
Part of the AugusteVN Modules collection.
Extension Method
AddSponsorshipsDbContext(this IServiceCollection, IConfiguration)
Registers the ISponsorshipsDbContext / SponsorshipsDbContext pair in the DI container with:
- SQL Server provider via
UseSqlServerusing theDefaultConnectionconnection string - Migrations assembly set to the
Sponsorships.Databaseassembly so EF Core discovers migrations at runtime - Migration history table namespaced as
Sponsorships_EFMigrationsHistoryto avoid collisions with other modules - No-tracking query behavior by default (
QueryTrackingBehavior.NoTracking)
Entity Model
SponsorSegment
Extends ReviewableBaseEntity from AugusteVN.Database.Entities:
| Column | Type | Nullable | Description |
|---|---|---|---|
Id |
Guid |
No | Primary key (inherited from BaseEntity) |
Email |
string |
No | Sponsor contact email |
BrandName |
string |
No | Sponsor brand name |
BodyAsMarkdown |
string |
No | Segment body in Markdown format |
BodyAsHtml |
string? |
Yes | Segment body pre-rendered as HTML |
PaymentRefId |
Guid |
No | Reference to the Payments module |
EmailJobId |
Guid? |
Yes | Associated email campaign job for metrics |
BlogPostSlug |
string? |
Yes | Associated blog post slug for content targeting |
IsPublished |
bool |
No | Whether the segment has been published (email/blog) |
IsFallback |
bool |
No | Whether this segment is used when no paid match exists |
IsApproved |
bool |
No | Review state (inherited from ReviewableBaseEntity) |
IsDeclined |
bool |
No | Review state (inherited from ReviewableBaseEntity) |
IsCancelled |
bool |
No | Review state (inherited from ReviewableBaseEntity) |
ISponsorshipsDbContext
Interface exposing DbSet<SponsorSegment> for testability and CQRS handler injection.
Migrations
The Migrations/ folder contains the full migration history:
| Migration | Description |
|---|---|
InitialSponsorships |
Creates the SponsorSegment table with core fields |
LinkToContent |
Adds BlogPostSlug for content-targeted sponsor matching |
RemovePaymentId |
Removes redundant payment ID column |
IsFallbackSegment |
Adds IsFallback flag for fallback segment support |
Registration
// Program.cs
builder.Services.AddSponsorshipsDbContext(builder.Configuration);
Installation
dotnet add package AugusteVN.Modules.Sponsorships.Database
Full Documentation
See the Sponsorships Module README for complete documentation.
Merged Domain Documentation
AugusteVN.Modules.Sponsorships.Database
Domain entities and shared interfaces for sponsorships — defines the ISponsorshipsDbContext contract and entity types used by both the EfCore persistence layer.
Entities
SponsorSegment (extends ReviewableBaseEntity)
| Property | Type | Nullable | Description |
|---|---|---|---|
Id |
Guid |
No | Primary key (inherited from BaseEntity) |
Email |
string |
No | Sponsor contact email |
BrandName |
string |
No | Sponsor brand name |
BodyAsMarkdown |
string |
No | Segment body in Markdown format |
BodyAsHtml |
string? |
Yes | Segment body pre-rendered as HTML |
PaymentRefId |
Guid |
No | Reference to the Payments module |
EmailJobId |
Guid? |
Yes | Associated email campaign job for metrics |
BlogPostSlug |
string? |
Yes | Associated blog post slug for content targeting |
IsPublished |
bool |
No | Whether the segment has been published (email/blog) |
IsFallback |
bool |
No | Whether this segment is used when no paid match exists |
IsApproved |
bool |
No | Review state (inherited from ReviewableBaseEntity) |
IsDeclined |
bool |
No | Review state (inherited from ReviewableBaseEntity) |
IsCancelled |
bool |
No | Review state (inherited from ReviewableBaseEntity) |
Interface
ISponsorshipsDbContext
public interface ISponsorshipsDbContext
{
DbSet<SponsorSegment> SponsorSegments { get; set; }
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}
Provider-agnostic contract implemented by both SponsorshipsEfCoreDbContext and SponsorshipsDbContext.
Dependencies
AugusteVN._Shared.ContractsAugusteVN.Database.Entities
Installation
dotnet add package AugusteVN.Modules.Sponsorships.Database
Full Documentation
See the Sponsorships Module README for complete documentation.
| Product | Versions 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. |
-
net10.0
- AugusteVN.Database.EFCore (>= 1.1.4)
- AugusteVN.Database.Entities (>= 1.1.4)
- Microsoft.EntityFrameworkCore (>= 10.0.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AugusteVN.Modules.Sponsorships.Database:
| Package | Downloads |
|---|---|
|
AugusteVN.Modules.Sponsorships.Features
CQRS handlers for sponsorship operations |
|
|
AugusteVN.Modules.Sponsorships.Api
Minimal API endpoints for sponsor segments |
GitHub repositories
This package is not used by any popular GitHub repositories.