I am working on a web project using ASP.Net 5 and EF7.
I imported all the tables from the existing database into my models in my project. However, I have problems with migrations.
I created the initial migration, made some changes to a specific entity, created another migration after the changes that I made, and now I want to apply the changes to the database.
After executing this command below:
dnx ef database update [Migration]
dnx tries to apply the “initial” migration with all entities that are already in the database, and this causes an error, as shown below:
{The database already has an object named ['EntityName']. }
Could you advise how to migrate to an existing database?
Thanks Saeed