I'm using EF6
And it happens that when I use Update-Database
it does not update my database.
For example
I have my model:
public class Cliente
{
public int Id {get;set}
public string Nome {get;set;}
}
If I add a new property:
public string CNPJ {get;set;}
And run Update-Database
or Update-Database -force
It does not update, and when it accesses the error and informs to do the migrations
What I already did was:
enable-migrations
add-migration InitialCreate
In the file of Configuration
set AutomaticMigrationsEnabled
:
public Configuration()
{
AutomaticMigrationsEnabled = true;
}