C
C#ā€¢2y ago
EliasGPS

āœ… I'm trying to scaffold a apicontroller but get error all the time.

I NEED HELP!!
8 Replies
EliasGPS
EliasGPSOPā€¢2y ago
this is my infrastructure:
EliasGPS
EliasGPSOPā€¢2y ago
this are the packages i installed:
EliasGPS
EliasGPSOPā€¢2y ago
i'm working in ASP.NET core 6 btw i already made a ProductsController manually. And everyhting is working. But when i try scaffolindg it gives me all the time that error and i don't know what information i can give more because i'm stuck for this for a long time
phaseshift
phaseshiftā€¢2y ago
That's a di error. You haven't registered the context/ context options properly
EliasGPS
EliasGPSOPā€¢2y ago
in my program.cs?
phaseshift
phaseshiftā€¢2y ago
Yes. Or Startup depending on how you're doing it
EliasGPS
EliasGPSOPā€¢2y ago
i mean i don't know what is wrong. This is my program.cs:
EliasGPS
EliasGPSOPā€¢2y ago
i add the context and Unitofwork OMFG i had to create an empty constructor in my ShoppingContext šŸ˜‚ šŸ˜‚ šŸ˜‚
Want results from more Discord servers?
Add your server