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));
        }
Beispiel #2
0
        private DeleteLoadtestResponse DeleteLoadtest(DeleteLoadtestRequest deleteLoadtestRequest)
        {
            DeleteLoadtestResponse resp = new DeleteLoadtestResponse();

            try
            {
                _timetableRepository.DeleteById(deleteLoadtestRequest.Id);
            }
            catch (Exception ex)
            {
                resp.Exception = ex;
            }
            return(resp);
        }
Beispiel #3
0
 public async Task <DeleteLoadtestResponse> DeleteLoadtestAsync(DeleteLoadtestRequest deleteLoadtestRequest)
 {
     return(await Task <DeleteLoadtestResponse> .Run(() => DeleteLoadtest(deleteLoadtestRequest)));
 }
Beispiel #4
0
 public async Task <DeleteLoadtestResponse> DeleteLoadtestAsync(DeleteLoadtestRequest deleteLoadtestRequest)
 {
     return(await _innerTimetableService.DeleteLoadtestAsync(deleteLoadtestRequest));
 }