예제 #1
0
        // GET: Comments/Details/5
        public ActionResult Details(int id)
        {
            var model = _db.Get(id);

            if (model == null)
            {
                return(HttpNotFound());
            }
            return(View(model));
        }
예제 #2
0
        public IActionResult Details(int id)
        {
            var model = _commentData.Get(id);

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

            return(View(model));
        }