Soenneker.Extensions.Entities
4.0.269
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Extensions.Entities --version 4.0.269
NuGet\Install-Package Soenneker.Extensions.Entities -Version 4.0.269
<PackageReference Include="Soenneker.Extensions.Entities" Version="4.0.269" />
<PackageVersion Include="Soenneker.Extensions.Entities" Version="4.0.269" />
<PackageReference Include="Soenneker.Extensions.Entities" />
paket add Soenneker.Extensions.Entities --version 4.0.269
#r "nuget: Soenneker.Extensions.Entities, 4.0.269"
#:package Soenneker.Extensions.Entities@4.0.269
#addin nuget:?package=Soenneker.Extensions.Entities&version=4.0.269
#tool nuget:?package=Soenneker.Extensions.Entities&version=4.0.269
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.698)
- Soenneker.Extensions.String (>= 4.0.740)
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.273 | 0 | 9/8/2026 |
| 4.0.272 | 0 | 9/7/2026 |
| 4.0.271 | 28 | 9/7/2026 |
| 4.0.270 | 31 | 9/7/2026 |
| 4.0.269 | 34 | 9/7/2026 |
| 4.0.268 | 77 | 9/5/2026 |
| 4.0.267 | 48 | 9/4/2026 |
| 4.0.266 | 45 | 9/4/2026 |
| 4.0.265 | 48 | 9/4/2026 |
| 4.0.264 | 145 | 8/31/2026 |
| 4.0.263 | 96 | 8/31/2026 |
| 4.0.262 | 110 | 8/31/2026 |
| 4.0.261 | 94 | 8/30/2026 |
| 4.0.260 | 96 | 8/30/2026 |
| 4.0.259 | 93 | 8/30/2026 |
| 4.0.258 | 84 | 8/30/2026 |
| 4.0.257 | 89 | 8/30/2026 |
| 4.0.256 | 91 | 8/30/2026 |
| 4.0.255 | 89 | 8/29/2026 |
| 4.0.254 | 93 | 8/29/2026 |
Update dependency Soenneker.Extensions.String to 4.0.740 (#661)