public async Task <IHttpActionResult> Delete(Guid id) { DeleteLoadtestRequest request = new DeleteLoadtestRequest(id); DeleteLoadtestResponse response = await _timetableService.DeleteLoadtestAsync(request); if (response.Exception == null) { return(Ok <string>("Deleted")); } return(InternalServerError(response.Exception)); }
private DeleteLoadtestResponse DeleteLoadtest(DeleteLoadtestRequest deleteLoadtestRequest) { DeleteLoadtestResponse resp = new DeleteLoadtestResponse(); try { _timetableRepository.DeleteById(deleteLoadtestRequest.Id); } catch (Exception ex) { resp.Exception = ex; } return(resp); }
public async Task <DeleteLoadtestResponse> DeleteLoadtestAsync(DeleteLoadtestRequest deleteLoadtestRequest) { return(await Task <DeleteLoadtestResponse> .Run(() => DeleteLoadtest(deleteLoadtestRequest))); }
public async Task <DeleteLoadtestResponse> DeleteLoadtestAsync(DeleteLoadtestRequest deleteLoadtestRequest) { return(await _innerTimetableService.DeleteLoadtestAsync(deleteLoadtestRequest)); }