Entity Framework Code-First - AutomaticMigrationsEnabled

1

I am learning Code-Fist and I came across the following situation: I am using AutomaticMigrationsEnabled = true so that the database data is synchronized with the classes.

But the changes I make in the class will only update the database when I save information from that class.

Is there any way to update the database without passing the class?

    
asked by anonymous 14.07.2018 / 00:40

1 answer

1

Yes. You open the Package Manager Console and type

Update-Database

This will automatically generate a new migration and update the database.

    
16.07.2018 / 16:36