I have added EF 5 to my project via Nuget and enabled migrations with the \"Enable-Migrations\" command. I have then called \"Add-Migration\" to generate the base code for g
Trying to migrate an old db version to a new model, either the database didn't match the new model or i got errors like :
Type is not resolved for member 'Npgsql.PostgresException,Npgsql, Version=3.2.2.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7'
Here's how it worked (using automatic migration) :
Set this two properties to true in the newly created Configuration.cs
public Configuration()
{
AutomaticMigrationsEnabled = true;
AutomaticMigrationDataLossAllowed = true;
}
Execute Update-Database -Force
Your database will be updated to latest scheme and ready.
hope this helps.