public static string RunCommand(string conn, string command) { //List<BsonDocument> results = new List<BsonDocument>(); BsonValue bv = new BsonValue(); string retval_bvv = string.Empty; // bv.ToString(); try { using (var db = new LiteDatabase(conn)) { Console.WriteLine( bv.ToString()); //BsonValue bv = db.RunCommand("db.customer.insert { Name: \"John Doe\" }"); //BsonValue bv = db.RunCommand("db.f**k.find glossary.GlossDiv.GlossList.GlossEntry.ID like \"SGML\""); //BsonValue bv = db.RunCommand(@"db.f**k.bulk C:\FxM\Dev\vs12\LiteDB\LiteDB-master\LiteDB.Shell\bin\Debug\test.dmp"); //BsonValue bv = db.RunCommand(@"db.f**k.bulk ..\..\..\..\test.dmp"); bv = db.RunCommand(command); //JObject json22 = bv.// JObject.Parse(bv.ToString); retval_bvv = bv.ToString(); //var json = LiteDB.JsonSerializer.Serialize(bv); //Console.WriteLine(json.ToString()); } } catch (Exception ex) { Console.WriteLine("wtf: " + ex.Message); retval_bvv = ex.Message; } return retval_bvv; }