I need to execute the following MongoDB query using C# driver to execute a javascript function on a field of type "Code" and check data inside contains a guid asa a string:
The mongodb query that works is this:
db.getCollection('BackgroundTasks').find({ Status: 1, $where: function() {
if (this.Settings.hasOwnProperty("ID")){
return this.Settings.ID== "606d7afb-3dce-4533-8f8d-6411715e5b47";
}
return false;
}
})
Need the C# version of code using Builders filter from the new API.