public SuccessResponse Delete(DeleteSaucerRequest request) { try { var saucer = _saucerRepository.FindBy(request.Id); saucer.ThrowExceptionIfRecordIsNull(); var isReference = _saucerRepository.IsReference(request.Id); isReference.ThrowExceptionIfIsReference(); _saucerRepository.Remove(saucer); return(new SuccessResponse { IsSuccess = true }); } catch (DataAccessException) { throw new ApplicationException(); } }
public SuccessResponse Delete(DeleteSaucerRequest request) { return(_saucerService.Delete(request)); }