Soenneker.Requests.Entity 11.0.310

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

A reusable request record for APIs where the same payload represents either a new or existing entity.

Installation

dotnet add package Soenneker.Requests.Entity

Usage

Derive an application request from EntityRequest to add an optional JSON id property:

using System.ComponentModel.DataAnnotations;
using Soenneker.Requests.Entity;

public record SaveWidgetRequest : EntityRequest
{
    [Required]
    public string Name { get; init; } = null!;
}

Omit Id when creating an entity:

var create = new SaveWidgetRequest
{
    Name = "Primary widget"
};

Supply the existing identifier when updating one:

var update = new SaveWidgetRequest
{
    Id = "75f11404-9c6f-4b33-b16c-d3ffea59f8f4",
    Name = "Renamed widget"
};

Id is a nullable string so it maps cleanly to request JSON. It carries NullableGuidValidation, which accepts an omitted value but requires a valid GUID when a value is present. Run your normal ASP.NET Core or data-annotation validation pipeline before using the request; JSON deserialization by itself does not execute validation attributes.

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

Showing the top 2 NuGet packages that depend on Soenneker.Requests.Entity:

Package Downloads
Soenneker.AutoFaker.Overrides.Requests.Entity

An AutoFaker (AutoBogus) override for the EntityRequest object

Soenneker.Requests.Entities.Named

A request model that includes a required, length-limited Name property for named entities.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.310 191 11/11/2026
11.0.309 105 11/11/2026
11.0.308 88 11/11/2026
11.0.307 127 11/11/2026
11.0.306 105 11/11/2026
11.0.305 76 11/11/2026
11.0.304 111 11/11/2026
11.0.303 90 11/11/2026
11.0.302 432 11/3/2026
11.0.301 128 11/3/2026
11.0.300 131 11/3/2026
11.0.299 169 11/2/2026
11.0.298 169 10/30/2026
11.0.297 122 10/30/2026
11.0.296 106 10/30/2026
11.0.295 254 10/26/2026
4.0.294 809 10/15/2026
4.0.293 125 10/14/2026
4.0.292 143 10/14/2026
4.0.290 131 10/14/2026
Loading failed

Updated Soenneker.Attributes.Validation.Guid.Nullable to 11.0.278