Esempio n. 1
0
        // GET: TestReply/Create
        public ActionResult Create()
        {
            ReplyViewModel model = new ReplyViewModel();

            model.Topics = _repo.GetTopics().ToList().Select(x => new SelectListItem
            {
                Value = x.Id.ToString(),
                Text  = x.Title
            });


            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Index()
        {
            var topics = _repo.GetTopics()
                         .OrderByDescending(t => t.Created)
                         .Take(25)
                         .ToList();

            return(View(topics));
            //return View();
        }