Exemplo n.º 1
0
        public async Task <IActionResult> DeletePerson([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var person = _personBusiness.GetPerson(id);

            if (person == null)
            {
                return(NotFound());
            }

            _personBusiness.DeletePerson(person);

            return(Ok(person));
        }
Exemplo n.º 2
0
 public void DeletePerson(Person person)
 {
     employeeBusiness.DeletePerson(Mapper.Map <Person, Model.Person>(person));
 }