Elfocrash / Cosmonaut

🌐 A supercharged Azure CosmosDB .NET SDK with ORM support
https://cosmonaut.readthedocs.io
MIT License
342 stars 44 forks source link

InvalidOperationException: Unable to resolve service for type 'Cosmonaut.ICosmosStore`1[SocialNet.Models.User]' while attempting to activate 'SocialNet.Controllers.UserController'. #11

Closed kklan closed 6 years ago

kklan commented 6 years ago

Hi,

Got another error while following the video. Attached below:

screen shot 2018-05-19 at 4 19 27 pm

My controller class looks like this:

screen shot 2018-05-19 at 4 22 30 pm

Also is there any way you can provide me a download link of the example project you work with in your Getting started video?

Thanks Kunal

Elfocrash commented 6 years ago

Are you sure you registered the correct User class? There might be some ambiguity issue with the name User as i don't see you using the using Models; on Startup.cs.

I would recommend renaming the User class to AppUser or something, just to test.

Also no the project is not uploaded anywhere but i can add it on Github if you need it.

kklan commented 6 years ago

Okay I will give this a try. Meanwhile, it would be a great help if you can add the project to Github.

Kunal

Elfocrash commented 6 years ago

Here you go https://github.com/Elfocrash/CosmosDBCRUDTutorial

kklan commented 6 years ago

Awesome, that was it. Thank you.

Elfocrash commented 6 years ago

You're welcome! 😄 Consider giving the project a star if you find it useful.