How do I query MongoDB using the C# driver with a query in string format? How do I query MongoDB using the C# driver with a query in string format? json json

How do I query MongoDB using the C# driver with a query in string format?


There is a slightly simpler way to do this (you should just replace " with '):

var el = BsonDocument.Parse("{'$and':[{'Name':'Accelero JKT M Tun XL '}]}");var doc = new QueryDocument(el);var result = coll.Find(doc);