public ActionResult Get(long id) { var resultado = _bookBusiness.FindById(id); if (resultado == null) { return(NotFound()); } return(Ok(resultado)); }
public IActionResult Get(long id) { var book = _business.FindById(id); if (book?.Id == null) { return(NotFound($"Book with id {id} not found")); } return(Ok(book)); }
public IActionResult Get(long id) { var book = _bookBusiness.FindById(id); if (book == null) { return(NotFound()); } return(Ok(book)); }
public ActionResult <string> Get(int id) { var book = _bookBusiness.FindById(id); if (book == null) { return(NotFound()); } return(Ok(_bookBusiness.FindById(id))); }
public IActionResult GetBook(int id) { return(Ok(GetUrl.GerarLinks( _bookBusiness.FindById(id), nameof(GetBook), this.HttpContext, _linkGenerator))); }
public IActionResult Get(long id) { var person = _bookBusiness.FindById(id); if (person == null) { return(NotFound()); } return(Ok(person)); }
public IActionResult Get(int id) { var person = _bookBusiness.FindById(id); if (person == null) { return NotFound(); } return Ok(person); }
public ActionResult Get(int id) { BookVO book = _booksBusiness.FindById(id); if (book == null) { return(NotFound()); } return(Ok(book)); }
public IActionResult GetId(long id) { var result = _bookBusiness.FindById(id); if (result == null) { return(BadRequest("Livro não encontrado com o ID: " + id)); } return(Ok(result)); }
public ActionResult <string> Get(long id) { var book = _bookBusiness.FindById(id); if (book == null) { return(NoContent()); } return(Ok(book)); }
public IActionResult Get(long id) { var books = _bookBusiness.FindById(id); if (books == null) { return(NotFound()); } return(new OkObjectResult(books)); }
public IActionResult Get(int id) { try { return(Ok(_converter.Parse(_bookBusiness.FindById(id)))); } catch (Exception ex) { throw ex; } }
public IActionResult Get(long id, [FromServices] IBookBusiness bookBusiness, [FromServices] IMapper mapper) { var resultDomain = bookBusiness.FindById(id); if (resultDomain != null) { return(Ok(mapper.Map <BookValue>(resultDomain))); } else { return(NotFound()); } }
public IActionResult Get(int id) { try { if (id != null) { return(Ok(_bookBusiness.FindById(id))); } else { return(NotFound()); } } catch (Exception) { return(BadRequest()); } }
public IActionResult GetByID(long id) { return(Ok(_business.FindById(id))); }
public IActionResult Get(int id) { return(Ok(_bookBusiness.FindById(id))); }