Example #1
0
        public async Task <TipResponse> SaveAsync(Tip tip)
        {
            try
            {
                await _tipRepository.AddAsync(tip);

                await _unitOfWork.CompleteAsync();

                return(new TipResponse(tip));
            }
            catch (Exception ex)
            {
                return(new TipResponse($"An error ocurred while saving the Tip: {ex.Message}"));
            }
        }