Skip to content

Instantly share code, notes, and snippets.

@xilikas
Last active December 31, 2018 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xilikas/fa74162325612210133168fd03f3f788 to your computer and use it in GitHub Desktop.
Save xilikas/fa74162325612210133168fd03f3f788 to your computer and use it in GitHub Desktop.
Useful EF Commands
- dotnet ef database update

Create database using migration schema

- dotnet ef database drop 

Delete entire database

- dotnet ef migrations add <Migration Name> 

Creates a new migration with provided name (does not apply migration to database without update)

- dotnet ef migrations remove

Removes the last migration if not applied to database

- dotnet ef migrations list

View created migrations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment