Skip to content

futongttmm/MyVidly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MVC_WithSecondIssue

Notice:

With changing "identity:false" to "identity:false" issue, a better way to solve it is to "re-create" the tables. Because _MigrationHistory Table records all the modifications we made from migration, so we cannot change previous setting (especially our initialModel) later by using migrations. So we need to clear _MigrationHistory, and this is how code-first entity framework works.

Furthermore, we can also use Package Manager Console to go back to previous Migration version. There are two ways to do that.
First, using a new database.
    1. Checkout the older version.
    2. Change the db name in the connection string.
    3. Update-database.
Second, using an existing database.
    Using pm command with a switch: update-database -TargetMigration: Target-migration-name

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published