Beispiel #1
0
        public IActionResult GetAll()
        {
            var list    = _services.GetAll();
            var listMap = _mapper.Map <IEnumerable <NewsEventModel> >(list);

            return(Ok(listMap));
        }
Beispiel #2
0
        // GET: NewsEvent
        public ActionResult NewsAndEvents()
        {
            var newsList = _newsEventService.GetAll().OrderByDescending(x => x.DateOfNews);

            return(View(newsList));
        }