I’m using v3.0.4 of Couchbase SDK.
According to https://docs.couchbase.com/dotnet-sdk/3.0/howtos/kv-operations.html, to delete a document I can run:
var result = await collection.RemoveAsync(“document-key”,
Code above has an issue. The signature of
Task RemoveAsync(string id, [NullableAttribute(2)] RemoveOptions options = null);
await convert to void and you can’t assign
void to a value, hence compiler generates the
CS0815 C# Cannot assign void to an implicitly-typed variable
If I run the code as
await collection.RemoveAsync("document-key"); without assignment, error is gone.
With all this said, there is no usable return that I can check against, to find out if the document removal operation was success or not ? How do I check if it was success of failure ?