Lyo.Email.Postgres
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Lyo.Email.Postgres --version 1.0.0
NuGet\Install-Package Lyo.Email.Postgres -Version 1.0.0
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="Lyo.Email.Postgres" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lyo.Email.Postgres" Version="1.0.0" />
<PackageReference Include="Lyo.Email.Postgres" />
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 Lyo.Email.Postgres --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Lyo.Email.Postgres, 1.0.0"
#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 Lyo.Email.Postgres@1.0.0
#: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=Lyo.Email.Postgres&version=1.0.0
#tool nuget:?package=Lyo.Email.Postgres&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Lyo.Email.Postgres
PostgreSQL schema and EmailDbContext for logging emails sent by Lyo.Email. This package does not subscribe to EmailService events — consumers handle the mapping and insertion (e.g. from the EmailSent / BulkEmailSent events) into the tables exposed here.
Examples
DI extensions
services.AddEmailDbContextFactoryFromConfiguration(builder.Configuration);
// or
services.AddEmailDbContextFactory(opts =>
{
opts.ConnectionString = "Host=...;Database=...;Username=...;Password=...";
opts.EnableAutoMigrations = true;
});
What ships
EmailDbContext— EF Core context withDbSet<EmailLogEntity>(email_logs) andDbSet<EmailAttachmentLogEntity>(email_attachment_logs). Default schema isemail.SaveChangessetsCreatedTimestampon insert andUpdatedTimestampon update for both entities.EmailDbContextFactory— design-time factory used by the EF Core tooling.EmailLogEntity— sender, recipients (as JSON), subject, success flag, SMTP message, error message, providerMessageId, and audit timestamps. Attachment bytes are not stored here.EmailAttachmentLogEntity— attachment metadata only (file name, optionalFileStorageId,TemplateId,ContentType,MetadataJson,SortOrder) keyed back to anEmailLogEntity.PostgresEmailOptions—IPostgresMigrationConfigimplementation. Section name isPostgresEmail; default schema isemail;EnableAutoMigrationsdefaults tofalse.
DI extensions
All extensions hang off IServiceCollection:
| Extension | Description |
|---|---|
AddEmailDbContext(string connectionString) |
Registers an IDbContextFactory<EmailDbContext> plus a scoped EmailDbContext resolved from the factory. |
AddEmailDbContext(Action<DbContextOptionsBuilder> configure) |
Registers EmailDbContext using a caller-supplied options builder (no factory). |
AddEmailDbContextFactory(PostgresEmailOptions options) |
Registers IDbContextFactory<EmailDbContext> against options.ConnectionString with the email migrations history schema, plus Lyo.Postgres migration runner support. |
AddEmailDbContextFactory(Action<PostgresEmailOptions> configure) |
Same as above with an inline configuration callback. |
AddEmailDbContextFactoryFromConfiguration(IConfiguration configuration, string configSectionName = PostgresEmailOptions.SectionName) |
Binds PostgresEmailOptions from configuration (section defaults to PostgresEmail) and registers the factory. |
Target frameworks
netstandard2.0;net10.0
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Exceptions— (direct, lyo)Lyo.Postgres— (direct, lyo)Microsoft.Extensions.Configuration.Binder10.0.5— (direct, microsoft)Microsoft.EntityFrameworkCore10.0.5— (transitive, microsoft)Microsoft.EntityFrameworkCore.Design10.0.5— (transitive, microsoft)Microsoft.EntityFrameworkCore.Relational10.0.5— (transitive, microsoft)Microsoft.Extensions.Hosting.Abstractions10.0.5— (transitive, microsoft)Microsoft.Extensions.Options10.0.5— (transitive, microsoft)Npgsql.EntityFrameworkCore.PostgreSQL10.0.3— (transitive, third-party)
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Lyo.Exceptions (>= 1.0.0)
- Lyo.Postgres (>= 1.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.