public async Task <IActionResult> OnGetAsync() { this.NewsCollection = await _newsAppService.GetAll(); return(Page()); }
public async Task <IActionResult> Index() { var data = await _newsAppService.GetAll(); return(View(_mapper.Map <IEnumerable <News>, IEnumerable <NewsViewModel> >(data))); }
public ActionResult News_View() { var myJson = _service.GetAll(); return(Json(myJson)); }
public async Task <IEnumerable <NewsViewModel> > Get() { return(await _newsAppService.GetAll()); }