示例#1
0
        public IActionResult GetAllPeople(string location, string job, string page, int age = default)
        {
            if (age < 0)
            {
                return(BadRequest("Age should be non negative"));
            }

            if (location == null && job == null && age == default)
            {
                return(Ok(peopleService.GetAllPeople(int.Parse(page))));
            }
            else
            {
                return(Ok(peopleService.FilterPeopleFromDB(location, job, age, int.Parse(page))));
            }
        }