I developed my web application in code first approach. When I changed my model then I have run the following commands for changing database.
Enable-Migrations -ContextTypeName DemoDbContext // It's only for first time
add-migration InitialCreate
and then,
Update-Database
Enable-Migrations -ContextTypeName DemoDbContext // It's only for first time
add-migration InitialCreate
and then,
Update-Database
No comments:
Post a Comment