public TramoDto GetByCoordinates(string coordinates) { string cacheKey = string.Format("ServiceTramo@GetByCoordinates@{0}", coordinates); return(SimpleCache.GetCache(cacheKey, () => { return _service.GetByCoordinates(coordinates); })); }
public IHttpActionResult GetRouting(string profile, string coordinates, bool overview = false, bool alternatives = false, bool steps = false, string hints = "") { coordinates = coordinates.Replace(";", "/").Trim(); TramoDto tramo = _serviceTramo.GetByCoordinates(coordinates); string jsonRouting = (tramo != null) ? tramo.JsonRouting : string.Empty; JObject jsonObj = null; if (!string.IsNullOrEmpty(jsonRouting)) { jsonObj = JObject.Parse(jsonRouting); } Result result = new Result(jsonObj); return(result.CreateResponse(this)); }