Example #1
0
        public async Task <IActionResult> OnGetAsync()
        {
            this.NewsCollection = await _newsAppService.GetAll();

            return(Page());
        }
Example #2
0
        public async Task <IActionResult> Index()
        {
            var data = await _newsAppService.GetAll();

            return(View(_mapper.Map <IEnumerable <News>, IEnumerable <NewsViewModel> >(data)));
        }
Example #3
0
        public ActionResult News_View()
        {
            var myJson = _service.GetAll();

            return(Json(myJson));
        }
Example #4
0
 public async Task <IEnumerable <NewsViewModel> > Get()
 {
     return(await _newsAppService.GetAll());
 }