예제 #1
0
        public IActionResult Get([FromQuery] string firstName, string last_name)
        {
            var person = _pessoa.FindByName(firstName, last_name);

            if (person == null)
            {
                return(NotFound());
            }
            return(Ok(person));
        }
예제 #2
0
        public IActionResult GetPessoaByName([FromQuery] String firstname, [FromQuery] string lastname)
        {
            var result = _business.FindByName(firstname, lastname);

            if (result == null || (result != null && result.Count == 0))
            {
                return(NotFound());
            }
            result.ForEach(r => GerarLinks(r));
            return(Ok(result));
        }
예제 #3
0
 public IActionResult GetByName([FromQuery] string firstName, string lastName)
 {
     return(Ok(_pessoaBusiness.FindByName(firstName, lastName)));
 }