public HttpResponseMessage Get(string collection, string id = "", string orderby = "", string query = "", string fields = "", string hub = "appboxr")
{
var _repo = GlobalHost.DependencyResolver.Resolve<IDataLayer>();
var _all = _repo.Get(new List<dynamic>() { new { collection = collection, fields = fields.Split(','), orderby = orderby, query = query, contextid = "API" } });
var _dyn = new { contextid = "", results = new List<dynamic>() };
var _res = JsonConvert.DeserializeAnonymousType(_all.First().ToString(), _dyn);
//no client notification needed as this is only an external GET
return this.Request.CreateResponse(
HttpStatusCode.OK
, (List<dynamic>)_res.results
);
}