示例#1
0
        public async Task <Book> Update(string isbn, string title, string description)
        {
            var response = await _getBook.GetBooks(isbn);

            var currentTitle = response.Select(p => p.Title).FirstOrDefault();

            var replyDescription = response.Select(p => p.Description).FirstOrDefault();

            var request = RequestBuilder(isbn, title, description);

            var result = await UpdateItemAsync(request);

            return(new Book
            {
                Isbn = result.Attributes["ISBN"].S,
                Title = result.Attributes["Title"].S,
                Description = result.Attributes["Description"].S
            });
        }
示例#2
0
        public async Task <IActionResult> GetBooks([FromQuery] string Isbn)
        {
            var response = await _getBook.GetBooks(Isbn);

            return(Ok(response));
        }