예제 #1
0
        public IActionResult Details(string id)
        {
            var entity = _newsData.Get(id);

            if (entity == null)
            {
                return(RedirectToAction("Index"));
            }

            var model = new NewsDocViewModel();

            model.Id   = entity._id;
            model.Main = entity.lead_paragraph;
            model.Type = entity.newsType;

            return(View(model));
        }