//反馈详情界面
        public IActionResult Index()
        {
            //34->Views/Home/Index.cshtml
            var viewModel = new HomeViewModel()
            {
                Feedbacks = _feedbackRepository.GetAllFeedbacks().ToList(),
                News      = _newRepository.GetAllNews().ToList(),
                Notices   = _noticeRepository.GetAllNotices().ToList(),
                Links     = _linkRepository.GetAllLinks().ToList()
            };

            return(View(viewModel));
        }
Exemple #2
0
        //这里要完成对新闻的查询(包括连接到详情页面)和删除、修改
        public IActionResult Index()
        {
            var viewModel = new HomeViewModel()
            {
                News = _newRepository.GetAllNews().ToList()
            };

            return(View(viewModel));
        }