public IActionResult Get(int id) { var person = _personBusiness.FindById(id); if (person == null) { return(NotFound()); } return(Ok(person)); }
public ActionResult <string> Get(long id) { var person = _personBusiness.FindById(id); if (person == null) { return(NotFound()); } return(Ok(person)); }
public IActionResult Get(long id) { var response = Ok(_personBusiness.FindById(id)); if (response == null) { return(NotFound()); } return(response); }
public IActionResult Get(int id) { var person = _personService.FindById(id); if (person != null) { return(Ok(person)); } return(NotFound(person)); }
// public ActionResult<string> Get(int id) public IActionResult Get(long id) { // return "value"; var person = _personBusiness.FindById(id); if (person == null) { return(NotFound()); } return(Ok(person)); }
public IActionResult Get(string id) { var person = _personRepository.FindById(id); if (person != null) { return(Ok(person)); } else { return(BadRequest("Id not found")); } }
public IActionResult Get(long id) { var person = _personbusiness.FindById(id); if (person == null) { return(NotFound()); } else { return(Ok(person)); } }
public IActionResult Get(long id, [FromServices] IPersonBusiness personService, [FromServices] IMapper mapper) { var resultDomain = personService.FindById(id); if (resultDomain != null) { return(Ok(mapper.Map <PersonValue>(resultDomain))); } else { return(NotFound()); } }
public IActionResult Get(int id) { try { var person = _personBusiness.FindById(id); if (person == null) { return(NotFound()); } return(Ok(person)); } catch (Exception ex) { throw ex; } }
public Person FindById(long id) { return(_repository.FindById(id)); }
public IActionResult Get(int id) { var person = _personService.FindById(id); if (person == null) return NotFound(); return Ok(person); }
public IActionResult GetById(long id) { return(Ok(_personBusiness.FindById(id))); }