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))); }
//GetById Author public ActionResult GetById(Int32 id) { var model = _AuthorAppService.GetById(id); return(PartialView("GetById", model)); }