n
n
notebook
Search…
2020/04/29_EFmigrationCmdLine
1
get-help entityframeworkcore
2
3
code first
4
5
Add-Migration Migration-FileName -c DBContext
6
7
Update-Database -c DBContext #update-database -verbose script-migration
8
9
10
dbfirst
11
12
--sqlserver
13
Scaffold-DbContext -Connection 'connectString' -Provider Microsoft.EntityFrameworkCore.SqlServer -OutputDir DirName -ContextDir DirName -Context NameContext
14
-Tables tablename1,tablename2,...
15
16
--mysql
17
Scaffold-DbContext -Connection 'connectString' -Provider Pomelo.EntityFrameworkCore.MySql -OutputDir DirName -ContextDir DirName -Context NameContext
18
-Tables tablename1,tablename2,...
Copied!
Copy link