// GET: Books/Details/5 public async Task <IActionResult> Details(string id) { if (id == null) { return(NotFound()); } var book = await _bc.FindByIdAsync(id); if (book == null) { return(NotFound()); } TempData["AvailableCopies"] = await _bc.GetNoOfAvailableModelCopies(book); return(View(book)); }