public ActionResult DeletePeople(int Id) { var people = _repository.GetPeopleById(Id); if (people == null) { return(NotFound()); } _repository.DeletePeople(people); _repository.SaveChanges(); return(NoContent()); }
public ActionResult DeletePeople(int Id) { var people = _repository.GetPeopleById(Id); if (people == null) { return(NotFound()); } _repository.DeletePeople(people); _repository.SaveChanges(); return(NoContent()); }