Skip to main content
Best practices
0 votes
3 replies
30 views

I'm using MongoDB with the .NET driver and trying to implement an optimistic concurrency pattern with versioning using UpdateOneAsync and IsUpsert = true. Here is my code: public Task UpsertAsync(User ...
Muhammed Furkan Güler's user avatar
2 votes
1 answer
88 views

I am experiencing a significant CPU spike under high concurrency when executing a simple AsQueryable projection using the MongoDB C# Driver. After profiling the application and debugging the driver ...
Z.Chen's user avatar
  • 159
Advice
0 votes
1 replies
59 views

I've encountered a critical performance issue in MongoDB 8.0.15 - 8.0.20. I need your help diagnosing and finding a solution. After upgrading from version 8.0.14 to any of the versions 8.0.15 - 8.0.20,...
CyberOPS's user avatar
-2 votes
0 answers
121 views

i was trying to run the project and was getting the below error also tried restricting it to ipv4 like this Error name: Error Error code: ECONNREFUSED Error message: querySrv ECONNREFUSED _mongodb....
KYAMPER's user avatar
  • 11
0 votes
1 answer
116 views

I use MongoDb in C#. Shown below is an object I want to clone, but also I want to merge it into the same collection. This is a simplified version of the document I use: class MyDocument { public ...
ugurg's user avatar
  • 1
2 votes
2 answers
97 views

Each Team document contains a list of Player documents. Each Player contains a list of strings named PlayerColors. The need is to update the PlayerColors of a specific Player within the specific team. ...
Skippy VonDrake's user avatar
2 votes
1 answer
84 views

After upgrading to C# driver v3.2.0 from v3.1.0, we’ve started to receive the following exceptions as UnobservedTaskExceptions in Sentry. SocketException is part of an AggregateException that is ...
Bob Banks's user avatar
2 votes
1 answer
167 views

I updated my project MongoDb C# driver to version 3.5.0 (from 3.4.1) and I started receiving this exception: MongoDB.Bson.BsonSerializationException: 'The discriminator element name cannot be ...
E.Benedos's user avatar
  • 1,871
0 votes
0 answers
76 views

Do not make instance data thread safe by default, it's a thing we know, but do you know, or have you tried, if a single instance of IClientSessionHandle can be used in tasks executing in parallel? ...
Ostati's user avatar
  • 4,741
1 vote
1 answer
51 views

I hope someone might be able to help. We have documents in an Atlas MongoDB collection with a structure like this: { "Id": "", "Child1": { "ChildId": &...
Orion's user avatar
  • 133
0 votes
1 answer
464 views

I am using Assembly MongoDB.Driver version 2.27 in my C# code (Targeting to netstandard2.1 as need some backward compatibility for older codebase). When I am changing version of Assembly MongoDB....
Creative Learner's user avatar
1 vote
1 answer
90 views

Have a ProjectA created for .NET Standard 2.1 with nuget packages MongoDB.Driver v2.12.0 and AspNetCore.HealthChecks.MongoDb v3.1.3. As part of MongoDB.Driver package upgrade, it updated the MongoDB....
Chethan's user avatar
  • 312
2 votes
1 answer
74 views

I'm trying to perform a single request to find the length of an array in a MongoDB document. In MongoDB, it can be done with an aggregation but to no success on my own. db.mycollection.aggregate([{$...
Riddsaw's user avatar
  • 45
1 vote
1 answer
99 views

I am trying to migrate my Database from Cosmos to Mongo. When trying to add an entry for an object which has a C# dynamic Type in MongoDB exception is thrown from the API InsertOneAsync() provided by ...
Rishabh Nigam's user avatar
0 votes
0 answers
123 views

I’m trying to do a very simple thing, I want to map a MongoDB document with nested fields to a flat class like so: Document: { code: "123", data: { other_code: "456&...
Evolve's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
184