Exemple #1
0
 public async Task <bool> AddPeople(model.People people)
 {
     if (await GetPeople(people.DocumentNumber) != null)
     {
         return(false);
     }
     peoples.Add(people);
     return(true);
 }
        public async Task <IActionResult> RemovePeople(model.People people)
        {
            bool isRemove = await peopleService.RemovePeople(people);

            if (isRemove)
            {
                return(Accepted());
            }
            else
            {
                return(BadRequest());
            }
        }
        public async Task <IActionResult> AddPeople(model.People people)
        {
            bool add = await peopleService.AddPeople(people);

            if (add)
            {
                return(Accepted());
            }
            else
            {
                return(BadRequest(""));
            }
        }