Create a RESTful API with .NET Core and MongoDB
HTML-код
- Опубликовано: 13 фев 2022
- ✅ Sign-up for a free cluster at: mdb.link/free-jJK9alBkzU0
✅ Get help on our Community Forums: mdb.link/community-jJK9alBkzU0
Want to build a web application with .NET Core and MongoDB? In this video tutorial, Nic Raboy shows how to build a RESTful web API with various CRUD endpoints that interact with MongoDB Atlas.
Blog post → trymongodb.com/3GhvKux
Subscribe to MongoDB → bit.ly/3bpg1Z1 Наука
✅ Sign-up for a free cluster at: mdb.link/free-jJK9alBkzU0
✅ Get help on our Community Forums: mdb.link/community-jJK9alBkzU0
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.
Great video, made changes to meet my own local MongoDB server.
Awesome!
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 ,
Thank you .
No problem!
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?
This is, amazing ❤️
Thanks for the compliment!
great video!
Thanks!
Thank you very much
No problem!
Is there any github for the tutorial?
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.
Usted es la verga mi llave, gracias. Encima como me gusta con vs code y con cmd.
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.
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 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 🙂