Soenneker.Extensions.Entities
4.0.284
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Extensions.Entities --version 4.0.284
NuGet\Install-Package Soenneker.Extensions.Entities -Version 4.0.284
<PackageReference Include="Soenneker.Extensions.Entities" Version="4.0.284" />
<PackageVersion Include="Soenneker.Extensions.Entities" Version="4.0.284" />
<PackageReference Include="Soenneker.Extensions.Entities" />
paket add Soenneker.Extensions.Entities --version 4.0.284
#r "nuget: Soenneker.Extensions.Entities, 4.0.284"
#:package Soenneker.Extensions.Entities@4.0.284
#addin nuget:?package=Soenneker.Extensions.Entities&version=4.0.284
#tool nuget:?package=Soenneker.Extensions.Entities&version=4.0.284
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.700)
- Soenneker.Extensions.String (>= 4.0.758)
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.291 | 37 | 9/25/2026 |
| 4.0.290 | 30 | 9/25/2026 |
| 4.0.289 | 62 | 9/24/2026 |
| 4.0.288 | 63 | 9/24/2026 |
| 4.0.287 | 136 | 9/16/2026 |
| 4.0.286 | 97 | 9/16/2026 |
| 4.0.285 | 86 | 9/16/2026 |
| 4.0.284 | 90 | 9/15/2026 |
| 4.0.282 | 99 | 9/13/2026 |
| 4.0.281 | 92 | 9/13/2026 |
| 4.0.280 | 91 | 9/13/2026 |
| 4.0.279 | 101 | 9/13/2026 |
| 4.0.278 | 93 | 9/12/2026 |
| 4.0.277 | 100 | 9/12/2026 |
| 4.0.276 | 93 | 9/12/2026 |
| 4.0.275 | 122 | 9/9/2026 |
| 4.0.274 | 93 | 9/8/2026 |
| 4.0.273 | 114 | 9/8/2026 |
| 4.0.272 | 110 | 9/7/2026 |
| 4.0.271 | 100 | 9/7/2026 |
Update dependency Soenneker.Entities.Entity to 4.0.700 (#679)