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
<PackageReference Include="Soenneker.Requests.Entity" Version="11.0.310" />
<PackageVersion Include="Soenneker.Requests.Entity" Version="11.0.310" />
<PackageReference Include="Soenneker.Requests.Entity" />
paket add Soenneker.Requests.Entity --version 11.0.310
#r "nuget: Soenneker.Requests.Entity, 11.0.310"
#:package Soenneker.Requests.Entity@11.0.310
#addin nuget:?package=Soenneker.Requests.Entity&version=11.0.310
#tool nuget:?package=Soenneker.Requests.Entity&version=11.0.310
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Attributes.PublicOpenApiObject (>= 11.0.67)
- Soenneker.Attributes.Validation.Guid.Nullable (>= 11.0.278)
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 |
Updated Soenneker.Attributes.Validation.Guid.Nullable to 11.0.278