AndreGoepel.Marten.Configuration 1.1.0

dotnet add package AndreGoepel.Marten.Configuration --version 1.1.0
                    
NuGet\Install-Package AndreGoepel.Marten.Configuration -Version 1.1.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="AndreGoepel.Marten.Configuration" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AndreGoepel.Marten.Configuration" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="AndreGoepel.Marten.Configuration" />
                    
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 AndreGoepel.Marten.Configuration --version 1.1.0
                    
#r "nuget: AndreGoepel.Marten.Configuration, 1.1.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 AndreGoepel.Marten.Configuration@1.1.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=AndreGoepel.Marten.Configuration&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=AndreGoepel.Marten.Configuration&version=1.1.0
                    
Install as a Cake Tool

AndreGoepel.Marten.Configuration

Small, singleton admin-configured settings records stored as Marten documents, sharing one physical table instead of each settings type getting its own one-row table.

Why

Apps often need a handful of admin-editable settings sections (email server, feature flags, cleanup schedules, ...). Each one is logically a single row: load it, show it in a form, save it back. This package gives that shape a common base so every settings type doesn't need its own hand-rolled Marten load/save boilerplate.

Usage

public sealed class EmailSettingsDocument : SettingsDocument, ISettingsDocument<EmailSettingsDocument>
{
    public static string DocumentId => "email-settings";

    public required string SenderEmail { get; init; }
}

Register the document type and the store during startup:

builder.Services.AddMartenConfiguration();

builder.Services.AddMarten(options =>
{
    options.Connection(connectionString);
    options.AddSettingsDocument<EmailSettingsDocument>();
});

Read and write it through ISettingsStore:

var settings = await settingsStore.LoadAsync<EmailSettingsDocument>(cancellationToken);

await settingsStore.SaveAsync(
    new EmailSettingsDocument { SenderEmail = "noreply@example.com" },
    cancellationToken
);

LoadAsync reads fresh from Postgres on every call (no caching), so a saved change takes effect on the next request without an application restart. SaveAsync sets Id to the type's DocumentId for you, so callers never need to remember it.

Every settings type registered via AddSettingsDocument<T>() shares Marten's document-hierarchy subclass mapping under SettingsDocument, so they all live in one physical table (mt_doc_settingsdocument) rather than proliferating one-row tables.

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 (5)

Showing the top 5 NuGet packages that depend on AndreGoepel.Marten.Configuration:

Package Downloads
AndreGoepel.Marten.Identity

ASP.NET Core Identity stores backed by Marten (PostgreSQL). Provides user, role, and user-role stores, middleware, and DI extensions.

AndreGoepel.Marten.Identity.Blazor

Blazor Server UI components for AndreGoepel.Marten.Identity — login, registration, 2FA, passkeys, and user/role administration pages built with Radzen.

AndreGoepel.AppFoundation.MailService

Email sending for AndreGoepel.AppFoundation: Wolverine message handler + MailKit SMTP sender with a durable Marten outbox.

AndreGoepel.AppFoundation

Reusable Blazor management frontend (layout, navigation, setup, and admin shell) for AndreGoepel.AppFoundation-based applications.

AndreGoepel.AppFoundation.Hosting

One-call backend seam (AddAppFoundation / UseAppFoundation) wiring Marten, identity, Wolverine messaging, email, data protection, and the request pipeline for AndreGoepel.AppFoundation hosts.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 0 7/26/2026
1.0.1 175 7/25/2026
1.0.0 78 7/25/2026 1.0.0 is deprecated because it has critical bugs.