Entity Framework Core migration from a console app not working

ef-migrations entity-framework entity-framework-core

Question

I am writing a simple console application to test some EF Core code.

I added the entityframework.commands package.

install-package entityframework.commands -pre

The connection string is correct and tested, but when I execute

Update-Database 

from the package manager I get the following error.

No DbContext was found. Ensure that you're using the correct assembly and that the type is neither abstract nor generic.

Of course, I have a context, just one in the project.

1
0
10/10/2016 9:43:41 PM

Accepted Answer

entityframework.commands is ancient. Use Microsoft.EntityFrameworkCore.Tools instead.

2
10/11/2016 5:29:12 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