[CSHARP-2338] convert from json to c# Created: 24/Jul/18  Updated: 05/Apr/19  Resolved: 17/Dec/18

Status: Closed
Project: C# Driver
Component/s: Json, Json.NET, Linq
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Critical - P2
Reporter: Arjun Assignee: Unassigned
Resolution: Done Votes: 0
Labels: question
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

visual studio



 Description   

how can i write the below code in c#. Thanks

 

{
  $lookup:
 

{     from: "temp",     localField: "BrandID",     foreignField: "BrandID",     as: "docs"   }

},
{$unwind: "$docs"},
{ $match:
 

{     "BrandRef" : \{$in: ["ABC", "ABS", "ABU"]}

,
    "docs.BrandID" : {$in: [828.0, 33.0, 238.0]},
    "docs.firstName" : {$in: ["Bruce", "Asddss"]}
  }
}



 Comments   
Comment by Ian Whalen (Inactive) [ 17/Dec/18 ]

Just to let you know this project is for .NET driver bugs or feature requests. The best place for questions regarding MongoDB usage or the .NET driver specifics is the mongodb-user mailinglist or stackoverflow as you will reach a broader audience there. If your business requires an answer from MongoDB within a time frame then we do offer production support.

You can also start out at these docs pages here: http://mongodb.github.io/mongo-csharp-driver/2.7/reference/driver/crud/reading/#aggregation

Generated at Wed Feb 07 21:42:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.