示例#1
0
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var hero = _heroAppService.GetHeroByID(id.Value);

            if (hero == null)
            {
                return(HttpNotFound());
            }

            return(View(hero));
        }
示例#2
0
        // GET: Hero/Details/5
        public ActionResult Details(Guid id)
        {
            var hero = _heroAppService.GetHeroByID(id);

            return(View(hero));
        }