Example #1
0
        public ActionResult GetList(string groupName)
        {
            var userdata = new UserDataContainer();
            IEnumerable <NewsItemViewModel> news;

            if (groupName != "All")
            {
                news = Mapper.Map <NewsItemViewModel, NewsItem>(newsManager.GetListForGroup(groupName));
            }
            else
            {
                news = Mapper.Map <NewsItemViewModel, NewsItem>(newsManager.GetListMatchingUserGroups(userdata));
            }

            var result = new NewsListPageView(news);

            return(PartialView("NewsList", result));
        }