コード例 #1
0
        public IActionResult View(int id)
        {
            var model = _person.GetPersonDetails(id);

            if (model == null)
            {
                return(NotFound()); //Return not found (404 friendly page) if model is null
            }

            return(View(model));
        }
コード例 #2
0
        public IActionResult Get(int id)
        {
            var detail = _service.GetPersonDetails(id);

            return(Ok(detail));
        }