I've been following the entire guide and was stuck with a problem of Swagger not recognizing my endpoints ("No operations defined in spec!"). Eventually, I figured it out. In case anyone else has the same problem, I've changed "[Controller]" to "[ApiController]" in PlaylistController.cs file. Other than that, thank you for your video!
Incredibly helpful video! great job and thank you! one question though, what's the mechanism in this approach for accessing another collection within the database? in this example you've hard coded the CollectionName to be "playlist" in the appsettings.json file. what do you do to access the "movies" and "theaters" collection from your sample_mflix database?
If you search/google for 'MongoDB Provider for EF Core Tutorial' there is an official mongodb article that shows how this can be done using the mongodb entity framework and using the [Collection("collectionName")] annotation when creating the collection model class.
Hey thank you for the video! I'm running into a CORS problem when trying to execute the GET request. What could I be doing wrong? (can't seem to find any answers on google) Edit: nevermind, it seemed to resolve itself, i think i cant make too many calls/requests to MongoDB in a short time maybe?
Have you validated that you are using the correct connection string, correct username and password, and have the proper user and network rules created within Atlas?
cant even create a simple upsert , swagger always shits out: Unable to cast object of type 'MongoDB.Bson.BsonObjectId' to type 'MongoDB.Bson.BsonBoolean'. at AsBooleanGetter(Object)
✅ Sign-up for a free cluster at: mdb.link/free-jJK9alBkzU0
✅ Get help on our Community Forums: mdb.link/community-jJK9alBkzU0
00:35= Prequisite Softwares, 01:17= Command to create new Web Api, 02:55= Create Module, Model-> MongoDBSettings.cs file, 04:30= appsettings.json , 06:25=ConnectionURL , 07:13= Services Module, 08:15= Read Only, 09:14= PlayList.cs , 17:20= Controller Module, 23:30= MongoDb Service, 24:46=Start From Here ,
I've been following the entire guide and was stuck with a problem of Swagger not recognizing my endpoints ("No operations defined in spec!"). Eventually, I figured it out. In case anyone else has the same problem, I've changed "[Controller]" to "[ApiController]" in PlaylistController.cs file. Other than that, thank you for your video!
Thanks for sharing your solution! I'm sorry I left in some confusion.
Incredibly helpful video! great job and thank you!
one question though, what's the mechanism in this approach for accessing another collection within the database? in this example you've hard coded the CollectionName to be "playlist" in the appsettings.json file. what do you do to access the "movies" and "theaters" collection from your sample_mflix database?
If you search/google for 'MongoDB Provider for EF Core Tutorial' there is an official mongodb article that shows how this can be done using the mongodb entity framework and using the [Collection("collectionName")] annotation when creating the collection model class.
Great video, made changes to meet my own local MongoDB server.
Awesome!
There's one problem at PUT method. When you try to update a document, it add a new item instead of updating the value of the current item.
21:45 He mentions that he is deliberately doing it.
So MongoDB service is basically like a repository if we use a repository pattern as you are in contact with database when you are in MongoDbService.
Is there any github for the tutorial?
Hey thank you for the video! I'm running into a CORS problem when trying to execute the GET request. What could I be doing wrong? (can't seem to find any answers on google)
Edit: nevermind, it seemed to resolve itself, i think i cant make too many calls/requests to MongoDB in a short time maybe?
This is, amazing ❤️
Thanks for the compliment!
Hello I have this error Internal server error: Unable to authenticate using sasl protocol mechanism SCRAM-SHA-1. can you help me?
Have you validated that you are using the correct connection string, correct username and password, and have the proper user and network rules created within Atlas?
I have followed every step but every action gives me "404: Not Found" error. How can I fix it?
By every action do you mean every time you try to make a request against the API? Any server logs rather than just client facing?
Thank you .
No problem!
great video!
Thanks!
Thank you very much
No problem!
Usted es la verga mi llave, gracias. Encima como me gusta con vs code y con cmd.
I Love you rsrsrsr
cant even create a simple upsert , swagger always shits out: Unable to cast object of type 'MongoDB.Bson.BsonObjectId' to type 'MongoDB.Bson.BsonBoolean'.
at AsBooleanGetter(Object)
Is there any particular line number involved in this? You might want to take this to the MongoDB forums and we can properly troubleshoot it 🙂