Soenneker.Extensions.Entities
4.0.259
Prefix Reserved
dotnet add package Soenneker.Extensions.Entities --version 4.0.259
NuGet\Install-Package Soenneker.Extensions.Entities -Version 4.0.259
<PackageReference Include="Soenneker.Extensions.Entities" Version="4.0.259" />
<PackageVersion Include="Soenneker.Extensions.Entities" Version="4.0.259" />
<PackageReference Include="Soenneker.Extensions.Entities" />
paket add Soenneker.Extensions.Entities --version 4.0.259
#r "nuget: Soenneker.Extensions.Entities, 4.0.259"
#:package Soenneker.Extensions.Entities@4.0.259
#addin nuget:?package=Soenneker.Extensions.Entities&version=4.0.259
#tool nuget:?package=Soenneker.Extensions.Entities&version=4.0.259
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.697)
- Soenneker.Extensions.String (>= 4.0.729)
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.259 | 0 | 8/30/2026 |
| 4.0.258 | 0 | 8/30/2026 |
| 4.0.257 | 0 | 8/30/2026 |
| 4.0.256 | 0 | 8/30/2026 |
| 4.0.255 | 27 | 8/29/2026 |
| 4.0.254 | 36 | 8/29/2026 |
| 4.0.253 | 35 | 8/29/2026 |
| 4.0.252 | 40 | 8/29/2026 |
| 4.0.251 | 76 | 8/26/2026 |
| 4.0.250 | 79 | 8/25/2026 |
| 4.0.249 | 88 | 8/21/2026 |
| 4.0.248 | 84 | 8/18/2026 |
| 4.0.247 | 84 | 8/18/2026 |
| 4.0.246 | 93 | 8/12/2026 |
| 4.0.245 | 90 | 8/8/2026 |
| 4.0.244 | 83 | 8/7/2026 |
| 4.0.243 | 106 | 7/29/2026 |
| 4.0.242 | 95 | 7/28/2026 |
| 4.0.241 | 94 | 7/28/2026 |
| 4.0.240 | 97 | 7/28/2026 |
Update dependency Soenneker.Extensions.String to 4.0.729 (#631)