Soenneker.Documents.Typed 11.0.182

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Documents.Typed

Adds an EntityType discriminator to the base document model for heterogeneous storage containers.

Installation

dotnet add package Soenneker.Documents.Typed

Usage

using Soenneker.Documents.Typed;

public sealed class CustomerDocument : TypedDocument
{
    public override string EntityType { get; set; } = "customer";

    public string Email { get; set; } = null!;
}

var customer = new CustomerDocument
{
    DocumentId = "customer-42",
    PartitionKey = "tenant-7",
    CreatedAt = DateTimeOffset.UtcNow,
    Email = "ada@example.com"
};

EntityType serializes as entityType with System.Text.Json. Identity and timestamp fields come from Document and retain their existing JSON names.

The discriminator is application-defined. This package does not register polymorphic converters, map discriminator values to CLR types, validate uniqueness, or stop callers from changing a value after construction. Keep values stable and configure your serializer or repository to select the correct concrete type during reads.

TypedDocument is abstract because each document family must implement EntityType. Use ITypedDocument when persistence or routing code only needs the shared identity, timestamp, and discriminator contract.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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 Soenneker.Documents.Typed:

Package Downloads
Soenneker.Cosmos.Repositories.Shared

A data persistence abstraction layer for Cosmos DB containers that have multiple document types

Soenneker.Documents.General

A document type for general storage purposes, with an EntityType property

Soenneker.Documents.Typed.Named

A generic document type for containers that have multiple types of documents that have a name

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.182 0 12/2/2026
11.0.181 135 12/1/2026
11.0.180 185 11/30/2026
11.0.179 101 11/30/2026
11.0.178 235 11/29/2026
11.0.177 969 11/18/2026
11.0.176 203 11/18/2026
11.0.175 522 11/15/2026
11.0.174 675 11/11/2026
11.0.173 143 11/11/2026
11.0.172 209 11/11/2026
11.0.171 191 11/11/2026
11.0.170 213 11/11/2026
11.0.169 264 11/11/2026
11.0.168 107 11/10/2026
11.0.167 995 11/3/2026
11.0.166 183 11/3/2026
11.0.165 235 11/2/2026
11.0.164 672 10/27/2026
11.0.162 421 10/26/2026
Loading failed

Updated Soenneker.Documents.Document to 11.0.2774