Reusable .NET libraries for transaction-processing services, including logging, serialization, web helpers, Entity Framework support, EventStore integration, result handling, and test infrastructure.
- .NET 10 SDK
- Docker Desktop for integration tests
- Access to the configured NuGet feeds
Install the package required by your application:
dotnet add package SharedOther packages can be installed independently depending on the functionality required.
- Structured logging and correlation IDs
- Tenant-aware request context
- JSON serialization helpers and naming policies
- ASP.NET Core middleware and result mappings
- Entity Framework Core helpers
- EventStore/KurrentDB integration
- Reusable integration-testing infrastructure
- Shared URL-based API versioning, per-version OpenAPI documents, and Scalar UI (
TransactionProcessing.ApiDefaults)
TransactionProcessing.ApiDefaults is a separate package. It is not referenced by Shared, so applications that only consume the non-web shared packages do not gain its ASP.NET Core dependencies.
Install it into an ASP.NET Core Minimal API project:
dotnet add package TransactionProcessing.ApiDefaultsRegister the defaults before building the application, then map versioned endpoint groups and enable the shared OpenAPI and Scalar endpoints:
using Asp.Versioning;
builder.Services.AddApiDefaults(options => options.Title = "Transaction API");
var app = builder.Build();
app.UseApiDefaults();
var api = app.NewVersionedApi("Transactions");
var transactions = api
.MapGroup("/api/v{version:apiVersion}/transactions")
.HasApiVersion(ApiVersions.V1);
transactions.MapGet("/", GetTransactions).MapToApiVersion(ApiVersions.V1);
app.Run();The package serves version-specific OpenAPI documents at /openapi/v1.json and the Scalar reference at /scalar. The version list is discovered from mapped endpoints; adding another version does not require updating the shared package. Run the complete example with dotnet run --project TransactionProcessing.ApiDefaults.Sample.
Run the test suite with:
dotnet test --solution Shared.slnDocker-backed integration tests require a compatible Linux Docker engine.
The repository is split into focused packages so applications can reference only the shared functionality they need.
Shared— core web, serialization, middleware, and persistence helpersShared.Logger— logging and tenant contextShared.Results— result and retry-policy abstractionsShared.EventStore— EventStore integrationShared.IntegrationTesting— integration-test infrastructureShared.Tests— unit tests for the core shared library
Pull requests should include relevant tests and maintain the project’s coverage expectations.
Add license information here.