public virtual async Task <ActionResult> Location(string urlSlug) { var cts = TaskHelper.CreateChildCancellationTokenSource(ClientDisconnectedToken()); try { var data = await _locationService.GetLocationAsync(urlSlug, cts.Token); if (data == null) { return(NotFound()); } //TODO: Locations need image paging string physicalPath = Server.GetWwwFolderPhysicalPathById(Folders.Gallery) + data.Album; return(View("Location", data)); } catch (Exception ex) { if (ex is OperationCanceledException) { throw ex; } else { return(HandleReadException()); } } }
public async Task <ResponseDTO <LocationWithCoordinatesDTO> > Get([FromUri] GetLocationRequest getRequest) { var resp = await _locationApplicationService.GetLocationAsync(new GetLocationRequest { Code = getRequest.Code }); return(resp); }