public CreateResponse Create(TipRequest request) { try { var tip = TypeAdapter.Adapt <Tip>(request); _tipValidator.ValidateAndThrowException(tip, "Base"); _tipRepository.Add(tip); return(new CreateResponse(tip.Id)); } catch (DataAccessException) { throw new ApplicationException(); } }
public Tip Add(Tip item) { return(_tipRepository.Add(item)); }
public void AddTip(Tip tip) => tipRepository.Add(tip);