public SuccessResponse Update(TipRequest request) { try { var currentTip = _tipRepository.FindBy(request.Id); currentTip.ThrowExceptionIfRecordIsNull(); var tipToCopy = TypeAdapter.Adapt <Tip>(request); TypeAdapter.Adapt(tipToCopy, currentTip); _tipValidator.ValidateAndThrowException(currentTip, "Base"); _tipRepository.Update(currentTip); return(new SuccessResponse { IsSuccess = true }); } catch (DataAccessException) { throw new ApplicationException(); } }