Deploy Entity Framework Core

https://www.benday.com/2017/03/17/deploy-entity-framework-core-migrations-from-a-dll/
http://www.learnentityframeworkcore.com/migrations
https://github.com/aspnet/EntityFrameworkCore/issues/6313#issuecomment-287230542

#!/bin/bash

EfMigrationsNamespace=$1
EfMigrationsDllName=$1.dll
EfMigrationsDllDepsJson=$1.deps.json
DllDir=$PWD
EfMigrationsDllDepsJsonPath=$EfMigrationsDllDepsJson
PathToNuGetPackages=$HOME/.nuget/packages
PathToEfDll=$PathToNuGetPackages/microsoft.entityframeworkcore.tools/2.0.1/tools/netcoreapp2.0/ef.dll
 
dotnet exec --depsfile ./$EfMigrationsDllDepsJson --additionalprobingpath $PathToNuGetPackages $PathToEfDll database update \n
--assembly ./$EfMigrationsDllName --startup-assembly ./$EfMigrationsDllName --project-dir . --data-dir $DllDir \n
--verbose --root-namespace $EfMigrationsNamespace
Kategoria: