public ActionResult DeletePerson(int personId) { var personModelFromRepos = _repository.GetPersonById(personId); if (personModelFromRepos == null) { return(NotFound()); } _repository.DeletePerson(personModelFromRepos); _repository.SaveChanges(); return(NoContent()); }