示例#1
0
        public IHttpActionResult GetParentById(string id)
        {
            logger.Info("Getting parent by parent ID, controller");
            ParentDTOHelper parent = parentsService.GetParentById(id);

            return(Ok(parent));
        }
        public IHttpActionResult GetParentById(string id)
        {
            ParentDTO parentDto = service.GetParentById(id);

            if (parentDto == null)
            {
                return(NotFound());
            }

            return(Ok(parentDto));
        }