Soenneker.Extensions.Entities
4.0.277
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Extensions.Entities --version 4.0.277
NuGet\Install-Package Soenneker.Extensions.Entities -Version 4.0.277
<PackageReference Include="Soenneker.Extensions.Entities" Version="4.0.277" />
<PackageVersion Include="Soenneker.Extensions.Entities" Version="4.0.277" />
<PackageReference Include="Soenneker.Extensions.Entities" />
paket add Soenneker.Extensions.Entities --version 4.0.277
#r "nuget: Soenneker.Extensions.Entities, 4.0.277"
#:package Soenneker.Extensions.Entities@4.0.277
#addin nuget:?package=Soenneker.Extensions.Entities&version=4.0.277
#tool nuget:?package=Soenneker.Extensions.Entities&version=4.0.277
Soenneker.Extensions.Entities
Extracts Cosmos-style partition and document identifiers from an IEntity compound Id.
Installation
dotnet add package Soenneker.Extensions.Entities
Usage
using Soenneker.Entities.Entity.Abstract;
using Soenneker.Extensions.Entities;
IEntity entity = GetEntity();
entity.Id = "customer-42:order-100";
string partitionKey = entity.ToPartitionKey(); // "customer-42"
string documentId = entity.ToDocumentId(); // "order-100"
The ID is split at its last colon. This supports compound partition keys:
region:customer-42:order-100
└──── partition key ────┘ └ document ID
When the ID contains no colon, both methods return the complete ID. A leading colon produces an empty partition key; a trailing colon produces an empty document ID. Null or empty entity IDs are rejected by the underlying string split operation, and passing a null entity is not supported.
| Product | Versions 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. |
-
net10.0
- Soenneker.Entities.Entity (>= 4.0.699)
- Soenneker.Extensions.String (>= 4.0.745)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.282 | 33 | 9/13/2026 |
| 4.0.281 | 36 | 9/13/2026 |
| 4.0.280 | 38 | 9/13/2026 |
| 4.0.279 | 48 | 9/13/2026 |
| 4.0.278 | 43 | 9/12/2026 |
| 4.0.277 | 49 | 9/12/2026 |
| 4.0.276 | 42 | 9/12/2026 |
| 4.0.275 | 98 | 9/9/2026 |
| 4.0.274 | 73 | 9/8/2026 |
| 4.0.273 | 96 | 9/8/2026 |
| 4.0.272 | 102 | 9/7/2026 |
| 4.0.271 | 92 | 9/7/2026 |
| 4.0.270 | 90 | 9/7/2026 |
| 4.0.269 | 92 | 9/7/2026 |
| 4.0.268 | 129 | 9/5/2026 |
| 4.0.267 | 102 | 9/4/2026 |
| 4.0.266 | 94 | 9/4/2026 |
| 4.0.265 | 100 | 9/4/2026 |
| 4.0.264 | 155 | 8/31/2026 |
| 4.0.263 | 105 | 8/31/2026 |
Update dependency Soenneker.Entities.Entity to 4.0.699 (#667)