EntityFramework AspNet Core migrations

3

Good evening, I came across a problem updating the DB of an AspNet Core application. I had created the database, but I ended up deleting it now when trying to create it again using the following commands:

dotnet ef migrations Initial 
dotnet ef database update

When executing the first command I get the following message:

D:\PROGRAMACAO\FONTES\ASPNET\LIVRO\FilmeMvc\src\FilmeMvc>dotnet ef migrations add InitialProject FilmeMvc (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation. Done. To undo this action, use 'dotnet ef migrations remove'

I removed the entire application, re-did the same again, while adding the first command in 'Developer Command Prompt for VS2015' I get the message quoted. How could you resolve this question.

    
asked by anonymous 17.02.2017 / 02:00

2 answers

0

Delete the data from the MigrationHistory table or execute dotnet ef migrations remove as the message suggests.

    
17.02.2017 / 04:30
0

Resolution: After deletion, performed Rebuild, resolved what was happening.

    
12.03.2017 / 22:38