I am using leagacy transcoder for setting and getting string type values. On version 3.1.0 I got errors in my logs
Couchbase error message: Specified argument was out of the range of valid values. (Parameter ‘start’) stack: at Couchbase.Utils.SlicedMemoryOwner1..ctor(IMemoryOwner1 memoryOwner, Int32 start, Int32 length)
at Couchbase.Core.IO.Operations.OperationBase.ExtractBody()
at Couchbase.KeyValue.CouchbaseCollection.GetAsync(String id, GetOptions options)
If i Set(key: “key”, value: “value”) -> calling Get(key:“key”) i get expected result “value”
If I Set(key: “key1”, value: “”) - > calling Get(key:“key1”) i get error above (same if i Set(key: “key2”, value: null))
I was able to run your code (with slight modifications) with no problems. I inserted a document and read it back; no exceptions or errors were encountered.
await collection.UpsertAsync("MyKey", new {Name = "test"});
var data = collection.GetAsync("MyKey").Result;
var doc = data.ContentAs<dynamic>();