Soenneker.Documents.Typed 11.0.174

Prefix Reserved
dotnet add package Soenneker.Documents.Typed --version 11.0.174
                    
NuGet\Install-Package Soenneker.Documents.Typed -Version 11.0.174
                    
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.174" />
                    
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.174" />
                    
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.174
                    
#r "nuget: Soenneker.Documents.Typed, 11.0.174"
                    
#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.174
                    
#: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.174
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Documents.Typed&version=11.0.174
                    
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.174 302 11/11/2026
11.0.173 79 11/11/2026
11.0.172 127 11/11/2026
11.0.171 118 11/11/2026
11.0.170 154 11/11/2026
11.0.169 204 11/11/2026
11.0.168 86 11/10/2026
11.0.167 959 11/3/2026
11.0.166 173 11/3/2026
11.0.165 222 11/2/2026
11.0.164 664 10/27/2026
11.0.162 416 10/26/2026
11.0.161 134 10/26/2026
4.0.160 688 10/15/2026
4.0.159 109 10/15/2026
4.0.158 123 10/14/2026
4.0.157 177 10/14/2026
4.0.156 111 10/14/2026
4.0.155 169 10/14/2026
4.0.154 105 10/14/2026
Loading failed

Updated Multiple NuGet packages