-
Type: Task
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
I write some code for run shell
var args = new EvalArgs
{ Args = Params.ToArray(), Code = js };
var result = mongoDb.Eval(args);
txtResult.Text = result.ToJson(MongoHelper.JsonWriterSettings);
When I run shell db.GroupTest.find({}); via C#.
the result looks like
{
"_mongo" :
,
"_db" : {
"_mongo" :
,
"_name" : "MongoBooster"
},
"_collection" : {
"_mongo" :
,
"_db" : {
"_mongo" :
,
"_name" : "MongoBooster"
},
"_shortName" : "GroupTest",
"_fullName" : "MongoBooster.GroupTest"
},
"_ns" : "MongoBooster.GroupTest",
"_query" : { },
"_fields" : null,
"_limit" : 0.0,
"_skip" : 0.0,
"_batchSize" : 0.0,
"_options" : 0.0,
"_cursor" : null,
"_numReturned" : 0.0,
"_special" : false
}
what I really want is the dataset records. How can I do it?Thank you.
The code below will return what I want,but , I want to get the result without use toArray() method,just like mongo.exe
var c = db.GroupTest.find({});
return c.toArray();