public HttpResponseMessage Search([FromBody] JToken jsonbody)
        {
            AdHocQuery adhoc = new AdHocQuery()
            {
                Fields = jsonbody["fields"].ToObject <string[]>().ToList <string>(),
                Query  = jsonbody["query"].ToString()
            };

            string myJson = BsonToJson.RinseBsonOutput
                                (new Data.Base().Find(adhoc, CollectionName));

            var response = this.Request.CreateResponse(HttpStatusCode.OK);

            response.Content = new StringContent(myJson, Encoding.UTF8, "application/json");
            return(response);
        }
 public string Get(string id)
 {
     return(BsonToJson.RinseBsonOutput
                (new Data.Base().FindById(id, CollectionName)));
 }