An open API service indexing awesome lists of open source software.

https://github.com/cfrenzel/entityframeworkcore.migrationsproject_2.2

Keep EntityFramework Core Migrations in their own assembly with DbContext
https://github.com/cfrenzel/entityframeworkcore.migrationsproject_2.2

Last synced: 9 months ago
JSON representation

Keep EntityFramework Core Migrations in their own assembly with DbContext

Awesome Lists containing this project

README

          

EntityFrameworkCore.MigrationsProject_2.2
=======

#### .NET Core 2.2 / EFCore 2.2 Template for keeping migrations scripts and DbContext in their own assembly

**Goals**

* Keep DbContext and Migrations in their own assembly
* Run the migrations as part of a deployment script

**To use:**
* Set the Startup Project to the MigrationHelper Project
* Messaging.Samples.Persistence.EFCore.MigrationHelper

**To Add a Migration From the Package Manager Console**

* Set DefaultProject to Messaging.Samples.Persistence.EFCore
* ```console
PM> Add-Migration Intitial
```
**To Update the Database From the Package Manager Console**

* Set DefaultProject to Messaging.Samples.Persistence.EFCore
* ```console
PM> Update-Database
```