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

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

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

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