Mistruna.Core.EfCore
5.0.0
dotnet add package Mistruna.Core.EfCore --version 5.0.0
NuGet\Install-Package Mistruna.Core.EfCore -Version 5.0.0
<PackageReference Include="Mistruna.Core.EfCore" Version="5.0.0" />
<PackageVersion Include="Mistruna.Core.EfCore" Version="5.0.0" />
<PackageReference Include="Mistruna.Core.EfCore" />
paket add Mistruna.Core.EfCore --version 5.0.0
#r "nuget: Mistruna.Core.EfCore, 5.0.0"
#:package Mistruna.Core.EfCore@5.0.0
#addin nuget:?package=Mistruna.Core.EfCore&version=5.0.0
#tool nuget:?package=Mistruna.Core.EfCore&version=5.0.0
Mistruna.Core
Production-oriented .NET building blocks for ASP.NET Core microservices: CQRS, validation, ProblemDetails, persistence, Redis, RabbitMQ, observability, resilience, and optional monetization primitives.
Packages
| Package | TFM | Responsibility |
|---|---|---|
Mistruna.Core.Abstractions |
net8.0;net10.0 |
Results, CQRS markers, entity/value-object bases, persistence contracts, domain events, and pagination DTOs |
Mistruna.Core |
net10.0 |
MediatR registration, validation and logging behaviors, exceptions, and core DI |
Mistruna.Core.AspNetCore |
net10.0 |
ProblemDetails, health, versioning, CORS, JWT, and IP rate limiting |
Mistruna.Core.EfCore |
net10.0 |
EF repositories, unit of work, and conventions |
Mistruna.Core.Caching.Redis |
net10.0 |
Redis caching and health check |
Mistruna.Core.Messaging.RabbitMq |
net10.0 |
RabbitMQ.Client 7 asynchronous bus |
Mistruna.Core.Monetization |
net10.0 |
API keys, plan authorization, tiered rate limits, idempotency, and metering |
Mistruna.Core.Observability |
net10.0 |
OpenTelemetry registration and MediatR activity enrichment |
Mistruna.Core.Resilience |
net10.0 |
HttpClient resilience presets and marked-command retry behavior |
Mistruna.Core.Testing |
net10.0 |
EF async providers and consumer test helpers |
There is no umbrella meta-package. Add only the packages your service uses:
dotnet add package Mistruna.Core
dotnet add package Mistruna.Core.AspNetCore
dotnet add package Mistruna.Core.EfCore
Quick start
using Mistruna.Core.DependencyInjection;
using Mistruna.Core.AspNetCore.DependencyInjection;
using Mistruna.Core.EfCore;
builder.Services.AddMistrunaCore(options =>
{
options.RegisterAssemblies(typeof(Program).Assembly);
options.AddValidation();
options.AddLoggingBehavior();
});
builder.Services.AddMistrunaAspNetCore();
builder.Services.AddMistrunaEfCore<AppDbContext>();
var app = builder.Build();
app.UseMistrunaExceptionHandler();
Optional integrations compose independently:
builder.Services.AddMistrunaRedis(builder.Configuration);
builder.Services.AddMistrunaRabbitMq(builder.Configuration);
builder.Services.AddMistrunaObservability(builder.Configuration);
builder.Services.AddMistrunaResilience();
builder.Services.AddMistrunaMonetization();
app.UseMistrunaTieredRateLimiting();
app.UseMistrunaIdempotency();
app.UseMistrunaUsageMetering();
Define requests with the markers from Mistruna.Core.Abstractions:
public sealed record GetUserQuery(Guid Id) : IQuery<UserDto>;
public sealed record CreateUserCommand(string Email) : ICommand<Guid>;
Foundation features
- System.Text.Json-only serialization and RFC 7807 ProblemDetails
- MediatR command/query markers with opt-in validation and logging behaviors
- EF Core repository, specification, and unit-of-work implementations
- Redis caching and health checks
- RabbitMQ.Client 7 async publishing via
IMistrunaRabbitBus.PublishAsync - OpenTelemetry tracing, metrics, and MediatR activity enrichment
- HttpClient resilience presets and optional marked-command retries
- API key authentication, plan authorization, rate limits, idempotency, and metering
- EF async query providers and result assertions for consumer tests
Samples
dotnet run --project samples/Mistruna.Core.Samples.BasicApi
dotnet run --project samples/Mistruna.Core.Samples.WorkerRabbit
dotnet run --project samples/Mistruna.Core.Samples.ApiWithOtel
The RabbitMQ sample requires a broker. See samples/README.md for configuration.
Build
Prerequisite: .NET 10 SDK
dotnet format --verify-no-changes
dotnet test
dotnet pack --configuration Release --output ./artifacts
./Build.ps1 runs restore, build, test, and pack. Packages are written to artifacts/.
Contributing
See CONTRIBUTING.md. Pull requests are welcome.
License
MIT — see LICENSE.
| 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
- Microsoft.EntityFrameworkCore (>= 10.0.5)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Mistruna.Core.Abstractions (>= 5.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Mistruna.Core.EfCore:
| Package | Downloads |
|---|---|
|
Mistruna.Core.Testing
EF async test providers and consumer test helpers for Mistruna. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.0 | 120 | 7/23/2026 |