// GET: Book/Details/5 public ActionResult Details(int id) { var bookDomain = _bookApp.GetById(id); var bookVM = Mapper.Map <Book, BookViewModel>(bookDomain); return(View(bookVM)); }
public IActionResult Details(Guid?id) { if (id == null) { return(NotFound()); } var customerViewModel = _bookAppService.GetById(id.Value); if (customerViewModel == null) { return(NotFound()); } return(View(customerViewModel)); }
public IActionResult Details(long?id) { if (id == null) { return(NotFound()); } var bookViewModelResult = _bookAppService.GetById(id.Value); if (bookViewModelResult?.Data == null) { return(NotFound()); } return(View(bookViewModelResult.Data)); }
public ActionResult Delete(BookViewModel book) { var bookToRemove = _bookApp.GetById(book.BookId); _bookApp.Remove(bookToRemove); return(Json("Success", JsonRequestBehavior.DenyGet)); }
public BookViewModel Get(int id) { return(_bookService.GetById(id)); }
public IActionResult Get(Guid id) { var livro = _bookAppService.GetById(id); return(Ok(_mapper.Map <ListBookViewModel>(livro))); }
public IActionResult Get(Guid id) { var customerViewModel = _bookAppService.GetById(id); return(Response(customerViewModel)); }