Neox.Aspire.EntityFrameworkCore.MigrationWorker
1.0.0-preview.26403.7
dotnet add package Neox.Aspire.EntityFrameworkCore.MigrationWorker --version 1.0.0-preview.26403.7
NuGet\Install-Package Neox.Aspire.EntityFrameworkCore.MigrationWorker -Version 1.0.0-preview.26403.7
<PackageReference Include="Neox.Aspire.EntityFrameworkCore.MigrationWorker" Version="1.0.0-preview.26403.7" />
<PackageVersion Include="Neox.Aspire.EntityFrameworkCore.MigrationWorker" Version="1.0.0-preview.26403.7" />
<PackageReference Include="Neox.Aspire.EntityFrameworkCore.MigrationWorker" />
paket add Neox.Aspire.EntityFrameworkCore.MigrationWorker --version 1.0.0-preview.26403.7
#r "nuget: Neox.Aspire.EntityFrameworkCore.MigrationWorker, 1.0.0-preview.26403.7"
#:package Neox.Aspire.EntityFrameworkCore.MigrationWorker@1.0.0-preview.26403.7
#addin nuget:?package=Neox.Aspire.EntityFrameworkCore.MigrationWorker&version=1.0.0-preview.26403.7&prerelease
#tool nuget:?package=Neox.Aspire.EntityFrameworkCore.MigrationWorker&version=1.0.0-preview.26403.7&prerelease
Neox.Aspire.EntityFrameworkCore.MigrationWorker
One-shot EF Core migration helper for .NET worker apps. Registers a BackgroundService that applies pending migrations for a registered DbContext, then stops the host.
Install
dotnet add package Neox.Aspire.EntityFrameworkCore.MigrationWorker
<PackageReference Include="Neox.Aspire.EntityFrameworkCore.MigrationWorker" Version="1.0.0-preview.*" />
Usage
Register your DbContext first (provider-specific), then call AddEfCoreMigrationService:
using Neox.Aspire.EntityFrameworkCore;
var builder = Host.CreateApplicationBuilder(args);
// Register your DbContext first (provider-specific).
builder.Services.AddDbContext<ApplicationDbContext>(...);
builder.Services.AddEfCoreMigrationService<ApplicationDbContext>();
builder.Build().Run();
On startup the hosted service:
- Creates a DI scope and resolves
TDbContext - Calls
Database.MigrateAsync - Stops the application host via
IHostApplicationLifetime.StopApplication()
Aspire AppHost pattern
Use a dedicated worker project as a migration service and add it from the AppHost (for example with AddProject and a wait-for relationship on the database). This package is not an Aspire hosting package: it has no Add* / With* extensions on IDistributedApplicationBuilder.
Notes
- The package does not register or configure the
DbContextor database provider — that remains the consumer’s responsibility. - Namespace:
Neox.Aspire.EntityFrameworkCore(package id differs from the namespace). - License: MIT.
| 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.Relational (>= 10.0.8)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.8)
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 |
|---|---|---|
| 1.0.0-preview.26403.7 | 47 | 8/3/2026 |
| 1.0.0-preview.26402.6 | 38 | 8/2/2026 |
| 1.0.0-preview.26402.5 | 42 | 8/2/2026 |
| 1.0.0-preview.26380.4 | 53 | 7/30/2026 |
| 1.0.0-preview.26380.3 | 40 | 7/30/2026 |
| 1.0.0-preview.26378.2 | 53 | 7/28/2026 |