Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.36 KB

README.md

File metadata and controls

39 lines (31 loc) · 1.36 KB

SQL Migration Operations

Build status

This is an extension library for the migrations used in EF Core. It's a work in progress library, as new and additional extensions will be added at any given time. So feel free to give feedback, request additional support, ...

Supports .NET Core, .NET Standard, .NET Framework

Get it on Nuget

The package:

PM> Install-Package SqlMigrationOperations

Usage

Install the SqlMigrationOperations package

The package:

PM> Install-Package SqlMigrationOperations

Registering dependencies

Call below code inside the Configure method in Startup.cs or from inside an IServiceCollection extension

 services
    .AddEntityFrameworkSqlServer()
    .AddDbContext<{MyDbContext}>(options =>
    {
        options.UseSqlServer(connectionString);
        options.ReplaceService<IMigrationsSqlGenerator, SqlMigrationOperationsGenerator>();
    })
    .BuildServiceProvider();

Need support for a different provider (PostgreSQL, ...) ? Feel free to open a new issue

Todo

  • Adding other provider (PostgreSQL)
  • Extending Operations