public async Task <IActionResult> Edit(string id) { if (id == null) { return(NotFound()); } BookModel book_retrieved = await _bookApiService.GetBook(id); if (book_retrieved == null) { return(NotFound()); } BookIventoryCE_ViewModel book = new BookIventoryCE_ViewModel { id = book_retrieved.id, book_name = book_retrieved.book_name, genre = book_retrieved.genre, author_name = book_retrieved.author_name, publisher_name = book_retrieved.publisher_name, publish_date = book_retrieved.publish_date, language = book_retrieved.language, edition = book_retrieved.edition, book_cost = book_retrieved.book_cost, no_of_pages = book_retrieved.no_of_pages, book_description = book_retrieved.book_description, actual_stock = book_retrieved.actual_stock, issued_books = book_retrieved.issued_books, book_img = book_retrieved.book_img, }; return(View(book)); }