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;
		}
Пример #3
0
        private DeleteLoadtestResponse DeleteLoadtest(DeleteLoadtestRequest deleteLoadtestRequest)
        {
            DeleteLoadtestResponse resp = new DeleteLoadtestResponse();

            try
            {
                _timetableRepository.DeleteById(deleteLoadtestRequest.Id);
            }
            catch (Exception ex)
            {
                resp.Exception = ex;
            }
            return(resp);
        }