This development method also commonly know as "Code First" in Entity Framework.
However I searched numbers of blog posts and found not a lot of them mention the command to generate and update database. And here are the procedures to create or update your databases:
- Develop your object in visual studio
- Make sure your connection is correct and the account have permission to crate and update
- Open package manager console (view > other windows > package manager console)
- Enable automatic migration if you haven't by "PM> Enable-Migrations -EnableAutomaticMigrations"
- Update database command "PM> Update-Database"
Thanks Travis in providing these procedure.
No comments:
Post a Comment