EFContinuousMigrations 6.0.4
dotnet add package EFContinuousMigrations --version 6.0.4
NuGet\Install-Package EFContinuousMigrations -Version 6.0.4
<PackageReference Include="EFContinuousMigrations" Version="6.0.4" />
paket add EFContinuousMigrations --version 6.0.4
#r "nuget: EFContinuousMigrations, 6.0.4"
// Install EFContinuousMigrations as a Cake Addin #addin nuget:?package=EFContinuousMigrations&version=6.0.4 // Install EFContinuousMigrations as a Cake Tool #tool nuget:?package=EFContinuousMigrations&version=6.0.4
Entity Framework Continuous Migrations
What is EF Continuous Migrations?
Entity Framework Continuous Migrations is an EF Core extension for conditionally applying pending migrations to a database at runtime using application configuration settings.
Why would I use it?
You want to ensure the latest EF migrations have been applied during application startup. An example of this would be during an ASP.NET Core application at startup for a given development environment.
How do I use it?
EF Continuous Migrations is added to an application using the AddContinuousMigrations<T>
IServicesCollection
extension method.
The following example shows how this is done for an ASP.NET Core application in the Startup.ConfigureServices
method for an application using a MySql database.
services
.AddDbContext<ApplicationDbContext>(options =>
options
.UseMySql(Configuration.GetConnectionString("DefaultConnection"))
)
.AddContinuousMigrations<ApplicationDbContext>()
.AddControllersWithViews();
EF Continuous Migrations is enabled by default and requires no configuration settings. In order to disable migrations from being applied add the following configuration to a your appsettings.{environment}.json
file:
"ContinuousMigrations": {
"Enabled": false
}
A working example can be seen in the Sample application.
Issue?
If you have any issues please report it here.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.EntityFrameworkCore (>= 6.0.4)
- Microsoft.EntityFrameworkCore.Relational (>= 6.0.4)
- Microsoft.Extensions.Configuration (>= 6.0.1)
- Microsoft.Extensions.Configuration.FileExtensions (>= 6.0.0)
- Microsoft.Extensions.Configuration.Json (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.