Joining Collections in MongoDB with .NET Core and an Aggregation Pipeline
HTML-код
- Опубликовано: 29 сен 2024
- ✅ Sign-up for a free cluster at: mdb.link/free-...
✅ Get help on our Community Forums: mdb.link/commu...
Learn how to use the MongoDB aggregation pipeline to join data from numerous collections using .NET Core and C#.
A written version of this tutorial can be found at bit.ly/3sSCzfy
Subscribe to MongoDB ►►► bit.ly/3bpg1Z1
✅ Sign-up for a free cluster at: mdb.link/free-nyKQagiYZlI
✅ Get help on our Community Forums: mdb.link/community-nyKQagiYZlI
this code looks horrendous
Nice. Thanks and Appreciate! I am waiting for LINQ approach :)
Thank you so much! The linq / strongly typed approach is what we really need in our C# code ;-)
You are making harder for yourself by coded linebyline like this. Just compose your Aggregation in MongoDBCompass and export to C# (or any languages), copy and paste ... Done....
LOL, screw the LINQ ...
Amazing video. It really helped me
Is the LINQ approach already on the channel?
Is there a way to project or map the directly to the c# objects that represent the data? For example, instead of using BsonDocuments as the types, Using a type of Playlist and Movie where the type Playlist contains a property List?
That’s very nice, is there way in the pipeline you could just get the movie name out? Thanks
You can achieve this by using project on movies field, nesting in, including name field and nothing else.