BsonDocument filtration does not work as expected. I need to filter BsonDocument (I used the BsonDocument field to store JSON object). I need to filter using that json property.
As a example
public class Book
{
[BsonId]
public string Id { get; set; }
public string Author { get; set; }
[BsonExtraElements]
public BsonDocument Metadata { get; set; }
}
below json save in Metadata field (BsonDocument)
{
"name":"John 2",
"age":30,
"car":null
}
now I need to filter using name or age field. how can I do that in .net core ? any idea or support