Skip to content

Instantly share code, notes, and snippets.

@AndriiTsok
Created November 3, 2015 15:02
Show Gist options
  • Save AndriiTsok/aa5db01ba19564ced157 to your computer and use it in GitHub Desktop.
Save AndriiTsok/aa5db01ba19564ced157 to your computer and use it in GitHub Desktop.
EF migrations
Now that you have a model, you can use migrations to create a database for you.
Open a command prompt (Windows Key + R, type cmd, click OK)
Use the cd command to navigate to the project directory
Run dnvm use 1.0.0-beta8
Run dnx ef migrations add MyFirstMigration to scaffold a migration to create the initial set of tables for your model.
Run dnx ef database update to apply the new migration to the database. Because your database doesn’t exist yet, it will be created for you before the migration is applied.
@AndriiTsok
Copy link
Author

FOr azure SQL, open 1433 port

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