Example #1
0
        public IActionResult FindByName([FromQuery] string firstname, [FromQuery] string lastname)
        {
            var response = Ok(_personBusiness.FindByName(firstname, lastname));

            if (response == null)
            {
                return(NotFound());
            }
            return(response);
        }
Example #2
0
        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));
        }
Example #4
0
        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());
        }
Example #6
0
        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));
        }
Example #7
0
 public IActionResult GetByName([FromQuery] string firstName, [FromQuery] string lastName)
 {
     return(Ok(_personBusiness.FindByName(firstName, lastName)));
 }
Example #8
0
 public IActionResult Get([FromQuery] string firstName, [FromQuery] string lastName)
 {
     return(new OkObjectResult(_personBusiness.FindByName(firstName, lastName)));
 }