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
- Host: GitHub
- URL: https://github.com/cfrenzel/entityframeworkcore.migrationsproject_2.2
- Owner: cfrenzel
- Created: 2019-12-04T02:19:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-04T15:11:25.000Z (over 6 years ago)
- Last Synced: 2025-01-23T04:43:17.160Z (over 1 year ago)
- Language: C#
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```