Replies: 2 comments
-
I believe i figured it out. var doc = BsonMapper.Global.ToDocument(customer); |
Beta Was this translation helpful? Give feedback.
-
On older versions of LiteDB, lambda expressions were applied after deserialization. This was very flexible, but it had poor performance – for instance, if you ran something like This was changed in v5. Lambda expressions are now converted to The recommended way to delete documents is using their ids. You can also use If you absolutely must use a generic method and the comparison logic implemented in |
Beta Was this translation helpful? Give feedback.
-
When upgrading from an old version of the package, new errors are being thrown around the delete function.
The old layout accepted
public virtual T DeleteItemAsync(T item)
{
var c = _collection.Delete(i => i.Equals(item));
return item;
}
now,, there is an error which states "cannot convert lambda expression to type 'BsonValue' because it is not a delagate type
Beta Was this translation helpful? Give feedback.
All reactions