Entity Framework 命令

Generate database migration file

dotnet ef migrations add v1

Database migration file lists

dotnet ef migrations list

Removes the last database migration file

dotnet ef migrations remove

Generate a database migration sql script

dotnet ef migrations script [arguments] [Options]
arguments:
    <From>: The starting migration
    <To>    : The ending migration
Options:
       -o   :  The file to write the Result to

Update database migration file

dotnet ef database update

Delete Database

dotnet ef database drop

 

Guess you like

Origin www.cnblogs.com/leehomlee/p/11568380.html