public IActionResult FindByName([FromQuery] string firstname, [FromQuery] string lastname) { var response = Ok(_personBusiness.FindByName(firstname, lastname)); if (response == null) { return(NotFound()); } return(response); }
public IActionResult Get([FromQuery] string firstName, [FromQuery] string lastName) { var person = _personBusiness.FindByName(firstName, lastName); if (person == null) { return(NotFound()); } return(Ok(person)); }
public ActionResult <string> GetByName([FromQuery] string firstName, [FromQuery] string lastName) { var person = _personBusiness.FindByName(firstName, lastName); if (person == null) { return(NoContent()); } return(Ok(person)); }
public ActionResult <PersonVO> FindByName([FromQuery] string firstName, [FromQuery] string lastName) { List <PersonVO> persons = _personBusiness.FindByName(firstName, lastName); if (persons == null) { return(NotFound()); } return(Ok(persons)); }
public ActionResult GetByName([FromQuery] string firstName, string lastName) { var persons = _personBusiness.FindByName(firstName, lastName); if (persons != null && persons.Any()) { return(Ok(persons)); } return(NotFound()); }
public IActionResult Get([FromQuery] string name) { var persons = _personBusiness.FindByName(name); if (persons.Count() == 0) { return(NotFound($"Person with name {name} not found")); } return(Ok(persons)); }
public IActionResult GetByName([FromQuery] string firstName, [FromQuery] string lastName) { return(Ok(_personBusiness.FindByName(firstName, lastName))); }
public IActionResult Get([FromQuery] string firstName, [FromQuery] string lastName) { return(new OkObjectResult(_personBusiness.FindByName(firstName, lastName))); }