示例#1
0
 public GetBookByIsbnOutput GetBookByIsbn(GetBookByIsbnInput input)
 {
     return(new GetBookByIsbnOutput
     {
         Book = new BookDto(_bookRepository.GetBookByIsbn(input.Isbn))
     });
 }
示例#2
0
        public Book GetBookByIsbn(string isbn)
        {
            var input = new GetBookByIsbnInput
            {
                Isbn = isbn
            };

            using (var repo = new BookRepository())
            {
                var app    = new BookAppService(repo);
                var output = app.GetBookByIsbn(input);
                return(output.Book.ConvertToBook());
            }
        }