示例#1
0
        public async Task <ArtworkResponse> SaveArtworkAsync(Artwork artwork)
        {
            try
            {
                await artworkRepository.AddAsync(artwork);

                await unitOfWork.CompleteAsync();

                return(new ArtworkResponse(artwork));
            }
            catch (Exception ex)
            {
                return(new ArtworkResponse($"An error occured while saving artwork {ex.Message}"));
            }
        }