예제 #1
0
        public ActionResult Details(int id)
        {
            var model = _newsServices.GetNews(id);

            if (model == null)
            {
                return(HttpNotFound());
            }
            return(View(model));
        }
예제 #2
0
        public async Task <List <News> > GetNews()
        {
            var response = await newsServices.GetNews();

            if (!response.IsSuccess)
            {
            }
            var news = (List <News>)response.Result;

            return(news);
        }