Entity Framework Code-First - Automaticmigrationsenabled

Asked

Viewed 194 times

2

I am learning Code-Fist and I came across the following situation: I am using the AutomaticMigrationsEnabled = true for the database to be synchronized with the classes.

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

Is there any way to update the data flock, without passing class to class?

1 answer

2

Yes. You open the Package Manager Console and type

Update-Database

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.