EntityFramewok Core 6 WPF App
-
I'm trying to set up a repository project in a WPF solution. I'm following this[^] First I do
cd MyApp.Repository
Add-Migration InitialCreate -Project MyApp.RepositorySo far, so good. The Migrations folder appears in he repository project and everything seems ok. Then I do
update-database
and get back
No DbContext was found in assembly 'MyApp.Crypto'. Ensure that you're using the correct assembly and that the type is neither abstract nor generic.
The DBContext is in MyAppRepository. MyApp.Crypto is another C# class library in the solution. I have no clue wy EF is lookin in there. What am I doing wroing????
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
-
I'm trying to set up a repository project in a WPF solution. I'm following this[^] First I do
cd MyApp.Repository
Add-Migration InitialCreate -Project MyApp.RepositorySo far, so good. The Migrations folder appears in he repository project and everything seems ok. Then I do
update-database
and get back
No DbContext was found in assembly 'MyApp.Crypto'. Ensure that you're using the correct assembly and that the type is neither abstract nor generic.
The DBContext is in MyAppRepository. MyApp.Crypto is another C# class library in the solution. I have no clue wy EF is lookin in there. What am I doing wroing????
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
Check the "default project" list in the package manager console. If you don't specify the
-project
argument, this is the project that's used. EF Core tools reference (Package Manager Console) - EF Core | Microsoft Learn[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer