EDennis.MigrationsExtensions 3.9.2

.NET Standard 2.0
Install-Package EDennis.MigrationsExtensions -Version 3.9.2
dotnet add package EDennis.MigrationsExtensions --version 3.9.2
<PackageReference Include="EDennis.MigrationsExtensions" Version="3.9.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EDennis.MigrationsExtensions --version 3.9.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EDennis.MigrationsExtensions, 3.9.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install EDennis.MigrationsExtensions as a Cake Addin
#addin nuget:?package=EDennis.MigrationsExtensions&version=3.9.2

// Install EDennis.MigrationsExtensions as a Cake Tool
#tool nuget:?package=EDennis.MigrationsExtensions&version=3.9.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


This package provides extensions to Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder to support SQL Server Temporal tables and/or TestJson tables. NOTE: to use any of these extensions, you need to replace the SqlServerMigrationsSqlGenerator service with the MigrationsExtensionsSqlGenerator from this library. see Custom Migrations Operations.

When you add migrationBuilder.SaveMappings(); to the end of the Initial Migration's Up() method, the migrationBuilder saves table<->class mappings and column<->property mappings as SQL Server extended properties. These extended properties are useful when you need to determine class names and property names from the information schema. The EDennis.DataScaffolder Win Forms app will use these extended properties, when they are available.

When you add migrationBuilder.CreateMaintenanceProcedures(); to the beginning of the Initial Migration's Up() method, the migrationBuilder generates a "_" schema (if needed) and creates a number of helpful stored procedures and functions: (a) ResetIdentities, which ensures that the next value for each identity specification is the maximum of the Id associated with the identity spec; (b) ResetSequences, which is similar to ResetIdentities, but with sequences; (c) GetMappings, which returns all entity framework mappings generated by the SaveMappings operation; (d) MaxDateTime2, which returns the maximum datimetime2 value; (e) RightBefore, which gets the datetime2 value that is 100 nanoseconds before the provided datetime2 parameter; and (f) RightAfter, which gets the datetime2 value that is 100 nanoseconds after the provided datetime2 parameter. It is recommended to add migrationBuilder.DropMaintenanceProcedures(); to the end of the Initial Migration's Drop() method.

For any given entity that has SysStart (datetime2) and SysEnd (datetime2) properties, when you add modelBuilder.Entity<SomeClass>(e => { e.HasAnnotation("SystemVersioned", true); to OnModelCreating, a SQL Server Temporal Table and history table are automatically created. The history table has the same name as the temporal table but resides in a new schema suffixed by _history.

When you add migrationBuilder.CreateTestJsonTableSupport(); to the Initial Migration's Up() method, the migrationBuilder generates a "_maintenance" schema (if needed), creates a TestJson table, and creates a SaveTestJson stored procedure. It is recommended to add migrationBuilder.DropTestJsonTableSupport(); to the Initial Migration's Drop() method.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on EDennis.MigrationsExtensions:

Package Downloads

Alpha version that still requires (a) updated code comments, (b) updated wiki documentation, and (c) completed sample solution


Pre-release of the Library. Documentation to come.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.9.2 426 8/21/2020
3.9.1 281 8/21/2020
3.9.0 279 6/23/2020
3.7.1 298 6/22/2020
3.7.0 322 5/4/2020
3.6.1 594 1/3/2020
3.6.0 501 12/31/2019
3.5.0 354 10/8/2019
3.1.7 378 9/17/2019
3.1.6 3,490 4/26/2019
3.1.5 395 4/26/2019
3.1.4 428 4/24/2019
3.1.3 431 4/24/2019
3.1.2 437 4/24/2019
3.1.1 456 4/24/2019
3.1.0 7,635 2/24/2019
3.0.0 413 2/24/2019
2.0.0 409 2/23/2019
1.9.1 477 2/20/2019
1.9.0 439 2/19/2019
1.8.0 1,198 12/15/2018
1.7.1 521 11/17/2018
1.7.0 522 11/17/2018
1.6.0 664 10/18/2018
1.5.2 609 8/23/2018
1.5.1 622 8/23/2018
1.5.0 618 8/15/2018
1.4.0 624 8/6/2018
1.3.3 625 7/23/2018
1.3.2 615 7/20/2018
1.3.1 591 7/20/2018
1.3.0 724 6/6/2018
1.2.0 720 6/4/2018
1.1.2 761 3/13/2018
1.1.1 794 3/13/2018
1.0.0 749 3/11/2018
0.1.2 693 3/11/2018
0.1.1 685 3/10/2018
0.1.0 700 3/10/2018
0.0.2-alpha 688 3/8/2018
0.0.1-alpha 608 3/8/2018

Remove Debugger.Launch()