I use c# mongodb driver. When I want to update my specific values, it throws an exception. I used this before but I don't now how but i didn't get any error before. Here's my code:
var result = await col.UpdateManyAsync(
p => p.X > 5,
Builders<Payment>.Filter.Gt(p => p.Amount, 100).Set("Level", "High")
);
And here's my Payment class:
public class Payment
{
public ObjectId Id { get; set; }
public decimal Amount { get; set; }
public Type Type { get; set; }
}