I am facing an issue with the Bucket.Get<type>(docId) API.
I inserted a document into the couchbase as a json string. Code snippet below -
Id = docId,
Content = jsonObject.ToString(Formatting.Indented)
After that I try to get the document back from the couchbase using my entity Type which is exactly the deserialized version of the json string that I saved. The statement is as follows
I get an error - "“Unable to cast object of type ‘System.String’ to type ‘Entity.Customer’”.
Is this not suppose to work? Why does couchbase wants to return me a System.String type when I ask for deserialized Customer object.