Пример #1
0
        public async Task <BookDto> CreateAsync(CreateUpdateBookDto input)
        {
            var newBook = new BookDto
            {
                Id          = GuidGenerator.Create(),
                Name        = input.Name,
                PublishDate = input.PublishDate,
                Price       = input.Price
            };

            newBook = await Task.Run(() => _sampleBookDataService.CreateBook(newBook));

            return(newBook);
        }