Monday, December 31, 2012

MVC Database Migration.

Add: Connection String:
In the Package Manager Console window at the PM> prompt enter "Enable-Migrations -ContextTypeName MvcMovie.Models.MovieDBContext".
In the Package Manager Console window, enter the command "add-migration Initial" to create the initial migration.
In the Package Manager Console, enter the command "update-database" to create the database and run the Seed method.