简体   繁体   中英

How does automatic migrations work internally in Entity Framework 4.3

I want to know that how does automatic migrations work internally in Entity Framework 4.3 ?

ie when i add a new property in my Model and Run the 'Update-Database' command in Package Manager Console then Code First Migrations will update my database and will include the new column(for the new property).

Now i want to know how does 'Update-Database' command internally works ?

What do you want to know exactly?

If you run "Update-Database" and automatic migration is enabled for your DbContext, EF core compares current model with current Database schema and updates it if it would't cause any data loss. Otherwise you should specify -force key.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM