Beispiel #1
0
        public async Task <ResponseBookPreviewViewModel> GetBooks(RequestGetBookViewModel requestViewModel)
        {
            RequestGetBooksModel requestModel = _mapper.Map <RequestGetBooksModel>(requestViewModel);

            List <Book> books = await _bookRepository.GetByFilters(requestModel);

            ResponseBookPreviewViewModel result = await GetMappedBooks(books, requestModel);

            return(result);
        }
        public async Task <ResponseBookPreviewViewModel> GetBooks([FromBody] RequestGetBookViewModel requestModel)
        {
            ResponseBookPreviewViewModel books = await _bookService.GetBooks(requestModel);

            return(books);
        }