CouchbaseList<T>.Remove does not remove the item

I have a simple CouchbaseList of documents. I am having a problem removing documents from the list.

I retrieve the document using simple query.

var p = couchbaseList.FirstOrDefault(p => p.Name == "test");

I have tried a couple of different variations to remove the document, starting with

bool removeResult = couchbaseList.Remove(p); // always returns false

I then tried:

int listIndex = couchbaseList.IndexOf(p); // returns -1
couchbaseList.RemoveAt(listIndex);

Any suggestions?

A quick update. CouchbaseList.Remove works fine. I did not override Object.Equals in POCO class . WIth that addition to the code, CouchbaseList.Remove works as advertised.

1 Like

Ah, good deal @ticontask. Sorry we’d not had a chance to try it independently, but glad you got it worked out!