HoneyDrunk.Data
0.3.0
dotnet add package HoneyDrunk.Data --version 0.3.0
NuGet\Install-Package HoneyDrunk.Data -Version 0.3.0
<PackageReference Include="HoneyDrunk.Data" Version="0.3.0" />
<PackageVersion Include="HoneyDrunk.Data" Version="0.3.0" />
<PackageReference Include="HoneyDrunk.Data" />
paket add HoneyDrunk.Data --version 0.3.0
#r "nuget: HoneyDrunk.Data, 0.3.0"
#:package HoneyDrunk.Data@0.3.0
#addin nuget:?package=HoneyDrunk.Data&version=0.3.0
#tool nuget:?package=HoneyDrunk.Data&version=0.3.0
HoneyDrunk.Data
Persistence-neutral orchestration layer for the HoneyDrunk.Data node. Connects Kernel context to data layer behavior without depending on any specific database provider.
Purpose
This project bridges the gap between the abstract contracts in HoneyDrunk.Data.Abstractions and the concrete provider implementations. It provides:
- Kernel-aware implementations of
ITenantAccessorandIDataDiagnosticsContext - DI registration helpers and shared configuration options
- Application-layer activity sources for telemetry
Note: This package does not implement repository or unit of work contracts—those are provider concerns (e.g., HoneyDrunk.Data.EntityFramework).
Allowed Dependencies
HoneyDrunk.KernelandHoneyDrunk.Kernel.Abstractions- For context and operation integrationHoneyDrunk.Data.Abstractions- The contracts this package implements (tenant accessor, diagnostics context)Microsoft.Extensions.DependencyInjection.Abstractions- For registration helpersMicrosoft.Extensions.Options- For configurationHoneyDrunk.Standards- Analyzer package only (PrivateAssets=all)
Boundary note: Only this orchestration layer depends on HoneyDrunk.Kernel. Abstractions and provider packages should depend on Kernel.Abstractions only, unless runtime wiring is specifically required.
What Must Never Be Added
- No EntityFrameworkCore references - That belongs in the EF provider
- No database-specific code - No SQL Server, PostgreSQL, etc.
- No transport or auth references - HoneyDrunk.Transport and HoneyDrunk.Auth are not data concerns
Namespace Layout
HoneyDrunk.Data
├── Configuration/ # Options and settings
│ └── DataOptions.cs
├── Diagnostics/ # Telemetry infrastructure
│ ├── DataActivitySource.cs
│ └── KernelDataDiagnosticsContext.cs
├── Registration/ # DI registration helpers
│ └── ServiceCollectionExtensions.cs
└── Tenancy/ # Kernel-aware tenant identity access
└── KernelTenantAccessor.cs
Usage
// Register orchestration layer (provides tenant accessor, diagnostics context)
services.AddHoneyDrunkData(options =>
{
options.DefaultConnectionStringName = "MainDb";
options.EnableQueryTagging = true; // Hint for providers that support it
});
// Then add a provider package (e.g., HoneyDrunk.Data.SqlServer)
// Provider registration is separate and documented in provider packages
Kernel Integration
When Kernel context is available and services are wired through DI, this package:
- Exposes tenant identity via
KernelTenantAccessorfromIOperationContext.TenantId - Provides diagnostic context via
KernelDataDiagnosticsContext(correlation ID, operation ID, node ID) - Offers activity sources via
DataActivitySourcefor application-layer tracing
Note: Context availability depends on Kernel middleware and operation lifecycle. Background jobs, console utilities, and tests running outside Kernel context will have empty/default values. Persistence enrichment is available when context is present, not guaranteed in all scenarios.
| 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
- HoneyDrunk.Data.Abstractions (>= 0.3.0)
- HoneyDrunk.Kernel (>= 0.4.0)
- HoneyDrunk.Kernel.Abstractions (>= 0.4.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Options (>= 10.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on HoneyDrunk.Data:
| Package | Downloads |
|---|---|
|
HoneyDrunk.Data.EntityFramework
Entity Framework Core provider implementation for HoneyDrunk.Data. Complete architecture overhaul with tenant-aware DbContext, repository pattern, unit of work, command interceptors for correlation tracking, and health contributors. |
GitHub repositories
This package is not used by any popular GitHub repositories.
v0.3.0: Canary test coverage for Kernel context, outbox concurrency, and transport boundary invariants. No functional changes from v0.2.0.