Trying to scaffold a controller for ASP .NET api using MongoDB but get this message
Anyone have any idea what causes this?
2 Replies
This shit gets broken quite often actually... I never managed to fix it, I always created a new empty project and did the scaffold action there and just copied the stuff out to my actual project 😄
Thanks, I'll try this!
I managed to scaffold the controller by bypassing the mongoDB registration to the apps builderServices using temporary InMemory db.
However I am now faced with another issue. Since the mongo database won't register to the app, the endpoints do not show up in the Swagger UI.
What are my options from here?
This is what the context looks like.
The problem was solved by switching from EFCore to a standalone IMongoDB. EFCore does not seem to have stable support for MongoDB at this time.