Exemplo n.º 1
0
        public async Task <DocResponse> SaveAsync(Doc doc)
        {
            try
            {
                await _docRepository.AddAsync(doc);

                await _unitOfWork.CompleteAsync();

                return(new DocResponse(doc));
            }
            catch (Exception ex)
            {
                // Do some logging stuff
                return(new DocResponse($"An error occurred when saving the doc: {ex.Message}"));
            }
        }