I could not find a way to translate the fowling MongoDb command into C#
db.Queue.aggregate(
[
{ $match: { "Processed": false } },
{ $sort: { "LastTimeChanged": 1 } },
{ $limit: 1 },
{ $set: { "WorkerName": "WORKER_NAME", "Processed": true } },
{ "$merge": "Queue" }])
The issues that I fund was with the $set and $merge command
- $set -> in the MongoDb.Driver for .NET, associated with the Aggregate command I could not find any command that look like the $set
- $merge -> the merge command examples are exclusive for merging collections and in this case, I could not find a way to use the Merge method in the API.
Any one can throw light here!??
thanks Paulo Aboim Pinto