public WebApiResult GetById([FromRoute] int id, [FromQuery] string currentLocation) { try { return(Helper.OK(Helper.AddAntiforgeryToken(() => BikeService.GetById( id, string.IsNullOrEmpty(currentLocation) ? null : JsonConvert.DeserializeObject <Location?>(currentLocation) )))); } catch (Exception ex) { return(Helper.HandleException(ex)); } }