Exemple #1
0
        public async Task <IActionResult> Details(int id)
        {
            try
            {
                var currentBook = await _booksManager.GetByIdAsync(id);

                if (currentBook == null)
                {
                    return(NotFound());
                }

                return(View(_mapper.Map <BookViewModel>(currentBook)));
            }
            catch (Exception)
            {
                throw;
            }
        }