-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.11.2
-
Component/s: API
-
None
-
Environment:OSX (most likely all)
When we were using the version 2.10.3 we could create simple transactions, but after upgrading to the latest version the client would throw the following error when starting the transaction: 'Standalone servers do not support transaction mongo'.
I am not sure if this is an intended change or a bug.
Unable to find source-code formatter for language: csharp. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
using (var session = mongoClient.StartSession()) { try { session.StartTransaction(); if (insert) { await collection.InsertOneAsync(family); session.CommitTransaction(); return true; } else { var filter = Builders<FamilyModel>.Filter.Eq(x => x.Id, family.Id); var result = await collection.ReplaceOneAsync(filter, family); session.CommitTransaction(); return result.ModifiedCount > 0; } } }