public ActionResult BookDetails(int id) { ViewBag.OtherBook = _bookBusiness.Get().Take(4); Book book = _bookBusiness.GetById(id); return(View(book)); }
public ActionResult Get(long id) { try { var _result = _bookBusiness.GetById(id).CreateVO <Book, BookOutVO>() ?? throw new KeyNotFoundException($"Book {id} not found") ; return(Ok(_result)); } catch (Exception ex) { return(this.ReturnActionResult(ex)); } }
public BookDetail GetById(int id) => bookBusiness.GetById(id);
public ActionResult Edit(int id) { Book book = _bookBusiness.GetById(id); return(View(book)); }
public Book Get(int id) { return(_bus.GetById(id)); }
public IActionResult Get(int id) => Ok(_bookBusiness.GetById(id));