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));
        }
Beispiel #2
0
 public void DeletePerson(Person person)
 {
     employeeBusiness.DeletePerson(Mapper.Map <Person, Model.Person>(person));
 }