Lyo.ContactUs.Postgres 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Lyo.ContactUs.Postgres --version 1.0.2
                    
NuGet\Install-Package Lyo.ContactUs.Postgres -Version 1.0.2
                    
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.ContactUs.Postgres" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lyo.ContactUs.Postgres" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Lyo.ContactUs.Postgres" />
                    
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 Lyo.ContactUs.Postgres --version 1.0.2
                    
#r "nuget: Lyo.ContactUs.Postgres, 1.0.2"
                    
#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.ContactUs.Postgres@1.0.2
                    
#: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.ContactUs.Postgres&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Lyo.ContactUs.Postgres&version=1.0.2
                    
Install as a Cake Tool

Lyo.ContactUs.Postgres

PostgreSQL + EF Core implementation of Lyo.ContactUs.IContactUsService (PostgresContactUsService) backed by ContactUsDbContext, PostgresContactUsOptions, and AddPostgresMigrations<ContactUsDbContext, PostgresContactUsOptions> for auto-applied schema upgrades on host startup.

What ships

  • ContactUsDbContext + ContactUsDbContextFactory under Database/, with a single DbSet<ContactSubmissionEntity> (name / email / subject / message / phone / company / created timestamp; lengths mirror ContactUsRequest).
  • PostgresContactUsServiceContactUsServiceBase subclass that persists each submission via the registered IDbContextFactory<ContactUsDbContext>, logs the new id, and implements TestConnectionAsync by issuing Database.CanConnectAsync(...).
  • PostgresContactUsOptions (SectionName = "PostgresContactUs", Schema = "contact", ConnectionString, EnableAutoMigrations).
  • InitialCreate migration under Migrations/.

DI registration (Extensions)

Entry point What it does
AddContactUsDbContext(string connectionString) Registers the DbContext factory plus a scoped ContactUsDbContext resolved from the factory (handy for ad-hoc EF code).
AddContactUsDbContext(Action<DbContextOptionsBuilder>) Bare AddDbContext<ContactUsDbContext>(...) — bring your own provider configuration.
AddContactUsDbContextFactory(Action<PostgresContactUsOptions>) (plus (options) and FromConfiguration overloads) Registers IOptions<PostgresContactUsOptions>, AddPostgresMigrations<ContactUsDbContext, PostgresContactUsOptions>(), and IDbContextFactory<ContactUsDbContext> (UseNpgsql + migrations history under the contact schema).
AddContactUsPostgres(Action<PostgresContactUsOptions>) (plus (options) and FromConfiguration overloads) Calls AddContactUsDbContextFactory(...), ensures a ContactUsServiceOptions singleton exists (defaults if not provided), and registers IContactUsService → scoped PostgresContactUsService.

AddContactUsPostgres(...) is the one-stop registration for most callers. Use AddContactUsDbContextFactory(...) plus your own service registration when you want to wrap or decorate the service yourself.

Schema

Column Source
Id (PK, Guid) Generated in PostgresContactUsService.SubmitCoreAsync.
Name, Email, Subject, Message, Phone, Company Copied verbatim from the validated ContactUsRequest.
CreatedTimestamp DateTime.UtcNow at insert time.

Migrations history is tracked in __EFMigrationsHistory under the contact schema configured on PostgresContactUsOptions.Schema.

Dependencies

Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).

  • Lyo.ContactUs — (direct, lyo)
  • Lyo.Exceptions — (direct, lyo)
  • Lyo.Postgres — (direct, lyo)
  • Microsoft.EntityFrameworkCore 10.0.5 — (direct, microsoft)
  • Microsoft.EntityFrameworkCore.Design 10.0.5 — (direct, microsoft)
  • Microsoft.Extensions.Configuration.Binder 10.0.5 — (direct, microsoft)
  • Microsoft.Extensions.Options 10.0.5 — (direct, microsoft)
  • Lyo.Common — (transitive, lyo)
  • Lyo.Result — (transitive, lyo)
  • Microsoft.EntityFrameworkCore.Relational 10.0.5 — (transitive, microsoft)
  • Microsoft.Extensions.DependencyInjection.Abstractions 10.0.5 — (transitive, microsoft)
  • Microsoft.Extensions.Hosting.Abstractions 10.0.5 — (transitive, microsoft)
  • Microsoft.Extensions.Logging.Abstractions 10.0.5 — (transitive, microsoft)
  • Microsoft.Extensions.Options.ConfigurationExtensions 10.0.5 — (transitive, microsoft)
  • Npgsql.EntityFrameworkCore.PostgreSQL 10.0.3 — (transitive, third-party)
  • System.Memory 4.6.3 — (transitive, microsoft, netstandard2.0)
  • System.Text.Json 10.0.5 — (transitive, microsoft, netstandard2.0)
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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.9 0 8/22/2026
1.0.6 33 8/20/2026
1.0.4 42 8/20/2026
1.0.3 49 8/19/2026
1.0.2 65 8/19/2026
1.0.1 73 8/18/2026
1.0.0 86 8/16/2026