public List <Book> GetAll() { try { return(_appService.GetAll()); } catch (Exception ex) { throw ex; } }
public IActionResult Index() { var allBookViewModelsResult = _bookAppService.GetAll(); if (allBookViewModelsResult?.Data == null) { return(NotFound()); } return(View(allBookViewModelsResult.Data)); }
public ActionResult GetAll() { var bookViewModel = Mapper.Map <IEnumerable <Book>, IEnumerable <BookViewModel> >(_bookApp.GetAll()); return(Json(bookViewModel, JsonRequestBehavior.AllowGet)); }
public IEnumerable <BookViewModel> Get() { return(_bookService.GetAll()); }
// GET: Book public ActionResult Index() { var bookVMList = Mapper.Map <IEnumerable <Book>, IEnumerable <BookViewModel> >(_bookApp.GetAll()); if (bookVMList != null) { bookVMList = bookVMList.OrderBy(b => b.Title); } return(View(bookVMList)); }
public IActionResult Get() { var result = _bookAppService.GetAll(); return(Ok(_mapper.Map <IEnumerable <ListBookViewModel> >(result))); }
public Task <PagedResultDto <BookDto> > GetAll(GetBookInputDto input) { return(_BookAppService.GetAll(input)); }
public IActionResult Get() { return(Response(_bookAppService.GetAll().OrderBy(o => o.Name))); }