Ejemplo n.º 1
0
        public async Task <IActionResult> Index()
        {
            List <NewsModel> NewsList = new List <NewsModel>();

            NewsList.AddRange(await _CoachRepo.GetList());
            return(View(NewsList));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            List <NewsModel> newsList = new List <NewsModel>();

            newsList.AddRange(await _CoachRepo.GetList());
            return(View(newsList.Where(m => m.Date > DateTime.Now.AddDays(-7))));
        }