[CSHARP-1864] get JSON query to mongo on aggregation as string Created: 07/Dec/16  Updated: 05/Apr/19  Resolved: 07/Dec/16

Status: Closed
Project: C# Driver
Component/s: BSON
Affects Version/s: 2.2.3
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Alexander Zel Assignee: Unassigned
Resolution: Done Votes: 0
Labels: Feature, question
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

.NET c#


Attachments: PNG File ZWEku[1].png    

 Description   

IS it possible to get JSON (as string) for mongo from C# in code.
Visual Studio Watch show's the string, but how to get it in code I can't understand.

^var aggregate = procuraCollection.Aggregate(new AggregateOptions()

{ AllowDiskUse = true, UseCursor = true }

);
var dd2 = Builders<BsonDocument>.Filter.Eq("RepositoryId", this.repositoryId);
aggregate = aggregate.Match(dd2);
var json= ?????;^



 Comments   
Comment by Alexander Zel [ 07/Dec/16 ]

Console.WriteLine(aggregate.ToString());

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