![]() Ma.bat ( migrations add ): dotnet ef -project MyProjectModel -startup-project MyProjectWeb migrations add %1 It’s a piece of cake to set up batch files that call the migration commands with the proper parameters. To get around this, we can also front-load the two parameters that don’t change, leaving the stuff we’ll manually update at the end where the cursor is: dotnet ef -project MyProjectModel -startup-project MyProjectWebmigrations database updateįor more information about these parameters, check out the official docs. But in both cases, the cursor is at the end of the command, so you have to use the left arrow (or Ctrl+LeftArrow) to skip to the beginning of the line so you can edit the actual commands. When working with these commands, it’s pretty common to either copy/paste them or hit the up arrow in the command line to bring up the latest command. \MyProjectWeb\MyProjectWeb.csprojįront-Loaded Parameters (for Convenience) \MyProjectModel\MyProjectModel.csproj -startup-project. ![]() If for some reason the example above doesn’t work, you can point specifically to the actual project files: dotnet ef migrations add initialcreate -project. If you’re already in the root of the solution directory, providing the names of the projects as parameters is sufficient: dotnet ef migrations add initialcreate -project MyProjectModel -startup-project MyProjectWeb
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |