Thursday 1 December 2022

Generate SQL script from entity framework using powershell/visual studio


to run the below command , start PowerShell in visual studio. Select the database project.

In PowerShell:

 Script-Migration

this command will generate script from blank database to the latest migration.


Script-Migration migrationname1

this command will generate script from migration named migrationname1 to the latest migration.


Script-Migration migrationname1 migrationnamex

this command will generate script from migration named migrationname1 to migrationnamex



No comments:

Post a Comment