// Common code for all requests IHttpActionResult Common(string method, string database, string name, string id, KeyValuePair <string, string>[] query = null, string jsonbody = null) { var gateway = WebApiApplication.GetGateway(database); var ret = (gateway == null) ? Result.Failure("database not found: " + database) : gateway.JsonCall(method, name, id, query, jsonbody); if (ret.Ok) { return(Ok(ret.Value)); } return(BadRequest(ret.Message)); }
GatewayBase Runtime(string database) { return(WebApiApplication.GetGateway(database)); }