Ejemplo n.º 1
0
        public IndexDiscussionsViewModel AllDiscussions()
        {
            IndexDiscussionsViewModel discussions = new IndexDiscussionsViewModel();

            discussions.discussionViewModels = Db.Discussions.To <DiscussionViewModel>().ToList();

            return(discussions);
        }
        public IActionResult Index(IndexDiscussionsViewModel model)
        {
            model = DiscussionService.AllDiscussions();

            return(View(model));
        }