mongodb-csharp-2.0 Questions
6
Solved
My goal for this app is to create logic that monitors the database and will trigger actions when a document is added to the database (like sending an email). However, since this application may not...
Ceyx asked 7/2, 2018 at 13:45
2
Solved
I need to join 3 collections in aggregation with multiple $lookup
I tried in C# driver it allow me to $lookup User collection but can't perform second $lookup for Setting collection.
Anyone can he...
Conlen asked 8/8, 2019 at 5:18
4
Solved
Just upgraded my application to the latest stable MongoDB C# Driver 2.0.
During the migration, basic functionality has been broken and even the simplest query like: this.collection.Find(e => e....
Polyphony asked 19/5, 2015 at 18:56
2
Solved
I'm trying to initialize the MongoClient from the Mongo 2.0 driver as follows:
MongoClientSettings settings = new MongoClientSettings();
settings.WaitQueueSize = int.MaxValue;
settings.WaitQueueuT...
Studding asked 12/5, 2015 at 9:56
4
Solved
I've recently moved to the new MongoDB C# driver v2.0 from the deprecated v1.9.
Now, when I serialize a class that has a dictionary I sometimes run into the following BsonSerializationException:
...
Hellhound asked 23/1, 2015 at 14:16
2
Solved
How can i rewrite the following old code via the new C# MongoDb driver which using IMongoCollection interface :
var bulk = dbCollection.InitializeUnorderedBulkOperation();
foreach (var profile in ...
Payment asked 5/8, 2015 at 14:22
1
I want to create a text index for multiple fields and fields of elements in an array. Currently I define the path to the array elements as a string, which works. Is there a way to use an expression...
Morganmorgana asked 1/2, 2016 at 15:45
5
Solved
i am using official mongodb c# driver.
i want to query mongodb simliar to SQL Like
something like db.users.find({name:/Joe/} in c# driver
Lexicographer asked 5/12, 2011 at 7:43
6
Solved
I am using the latest version of Mongo C# driver which uses a lot of Async and builder pattern. Which is nice. I am trying to convert SQL where clauses into Mongo FilterDefinition object.
Any ide...
Linguiform asked 21/8, 2015 at 10:58
4
Solved
I want to query my MongoDB collection without any filter with MongoDB .NET Driver 2.0 but I didn't find a way. I have the following workaround but it looks weird :D
var filter = Builders<FooBar...
Brickbat asked 14/6, 2015 at 12:21
4
I've picked up a piece of code that is using the MongoDB driver like this to get a single object from a collection...this can't be right, can it? Is there a better way of getting this?
IMongoColle...
Belting asked 1/7, 2015 at 20:52
2
I am using version 2.2 of MongoDB drivers for C#.
I want to paginate a query : the response to the query must contain the items of the current page and the total count of items matching the query.
...
Ligni asked 29/12, 2015 at 22:52
4
Solved
I'm currently upgrading my code to MongoDB C# driver 2.0 and I'm having issues upgrading the code to update documents.
using the old version I was able to do something like this:
MyType myObject;...
Interdictory asked 15/5, 2015 at 10:19
2
Solved
I have the following spatial FilterDefinition:
var filter = Builders<MyDocument>
.Filter
.Near(x => x.Point, point, 1000);
Is there any way to include this into an IQueryable expressi...
Bimanous asked 1/2, 2016 at 13:30
1
Does anyone have any prior experience of working with the MongoDB C# Driver (v2+) with singleton style connection/collection instances in terms of connection resilience?
The Problem
We have...
Novelist asked 16/5, 2017 at 8:58
3
Solved
I'm using the MongoDB .Net driver in my project. I want to update all of the properties of my object that is stored in MongoDB. In the documentation, update is shown like this:
var filter = Build...
Domineer asked 17/6, 2015 at 13:25
2
Solved
The new C# driver is totally Async and in my understanding twists a little bit the old design patterns such as DAL in n-tier architecture.
In my Mongo DALs I use to do:
public T Insert(T entity){...
Chitter asked 7/5, 2015 at 4:26
2
I have a document that can have a "Favorites" element on it and I'm trying to push a new value into an array on that element. However, I'm getting an error because the document I'm trying to update...
Mink asked 17/6, 2015 at 19:50
4
In MongoDB c# driver (2.0+) can we do an upsert when doing and updateManyAsync? This example helps with UpdateOne, but i am looking for something that works with updateMany.
Make asked 27/11, 2015 at 23:40
6
Solved
I was using official C# driver to do a FindAll and upgraded to the new driver 2.0. FindAll is obsolete and is replaced with Find. I am trying to convert a simple method that returns me a list of Cl...
Gaudreau asked 17/4, 2015 at 21:41
2
Solved
I'm writing a generic method to act like data access layer to insert document to MongoDB using C# .Net. My method looks like below. Collection here is a MongoCollection retrieved from MongoDB...
Sisal asked 27/4, 2018 at 19:5
4
Solved
i found the way to check is the value contains in simple array :
var filter = Builders<Post>.Filter.AnyEq(x => x.Tags, "mongodb");
But how to find a complex item with many fields by a c...
Feline asked 3/8, 2015 at 11:36
1
Solved
When running the new MongDB Server, version 3.6, and trying to add a Change Stream watch to a collection to get notifications of new inserts and updates of documents, I only receive notifications f...
Enscroll asked 7/2, 2018 at 20:20
4
We've recently upgraded our web application to MongoDB C# Driver 2.0 and deployed to production. Below a certain load, the application runs fine. Once the load on the production server exceeds a ce...
Hollow asked 23/4, 2015 at 19:26
4
In the older .Net API version :
MongoClient client = new MongoClient();
var server = client.GetServer();
var db = server.GetDatabase("foo");
var collection = db.GetCollection<BsonDocument>(...
Retroflex asked 13/4, 2015 at 6:51
1 Next >
© 2022 - 2024 — McMap. All rights reserved.