Entity Framework Core 2.0 - Add-Migration doesn't work

asp.net asp.net-core-2.0 c# ef-migrations entity-framework-core

Question

I am creating a new project code-first. When trying to create a migration, using the [Add-Migration Initial -Context LogAuditoriaContext] command, it simply does nothing, doesn't create, doesn't give error, doesn't report anything.

I have already tried to map with FluentAPI on both OnModelCreating() and separate files, the result is the same.

Looking at Output Window, it shows: ========== Build: 0 succeeded, 0 failed, 6 up-to-date, 0 skipped ==========

I'm using dot.net core 2.0 and C # 7.2.

enter image description here

enter image description here

1
0
12/27/2017 3:00:05 PM

Accepted Answer

I discovered that the problem was the connection string, just change the name of LogAuditoria to LogAuditoriaConnection and its references in Startup and LogAuditoriaContext.

enter image description here

0
12/29/2017 3:52:07 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow