I'm querying data with C# driver for mongodb using projection. The code is like:
var filter = Builders<User>.Filter.Eq("_id", userId);
var projection = Builders<User>.Projection.Expression(u => Tuple.Create(u.UserId, u.UserName));
var cursor = await collection.Find(filter).Project(projection).ToCursorAsync();
How do I check the query generated by the C# code?
Copyright Notice:Content Author:「Jeffrey Zhao」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/50612838/examine-query-generated-from-mongodb-projection-by-c-sharp-driver