Skip to content

Instantly share code, notes, and snippets.

@Robbware
Created June 27, 2022 20:11
Show Gist options
  • Save Robbware/4bf4e854cc1a570f1c40a2a00cb418d5 to your computer and use it in GitHub Desktop.
Save Robbware/4bf4e854cc1a570f1c40a2a00cb418d5 to your computer and use it in GitHub Desktop.
Creates a .NET Core migration, with a specific migration project and a specific startup project.
param([string]$Name)
if([string]::IsNullOrEmpty($Name)) {
Write-Host "Fill in your migration name.";
return;
}
$MigrationProject = "";
$StartupProject = "";
dotnet ef migrations add $Name --startup-project $StartupProject --project $MigrationProject
Write-Host "Migration $Name created.";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment