public ActionResult GetBooksByIsbns(FindInformationInputModel findInformationInputModel) { if (findInformationInputModel.Isbns == null || findInformationInputModel.Isbns.Length == 0) { return(null); } return(Json(WorkerService.GetBooksViewModel(findInformationInputModel), JsonRequestBehavior.AllowGet)); }
public IEnumerable <BookViewModel> GetBooksViewModel(FindInformationInputModel findInformationInputModel) { _updateCommandHandler.Execute(new UpdateCommand(findInformationInputModel.Isbns)); var query = _queryRepository.Get(findInformationInputModel.Isbns); return(from c in query select new BookViewModel() { Title = c.Title, Url = c.Url, Imageurl = c.Imageurl }); }