コード例 #1
0
        public IActionResult GetAuthor(Guid id, [FromQuery] string fields)
        {
            if (!_typeHelperService.TypeHasProperties <AuthorOutputDto>(fields))
            {
                return(BadRequest());
            }

            var author = _authorService.GetById(id);

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

            return(Ok(author.ShapeDataObject(fields)));
        }
コード例 #2
0
        //GetById Author
        public ActionResult GetById(Int32 id)
        {
            var model = _AuthorAppService.GetById(id);

            return(PartialView("GetById", model));
        }