public ActionResult DeleteApartment(int id) { var modelFromRepo = _repo.GetResidentByID(id); if (modelFromRepo == null) { return(NotFound()); } _repo.DeleteResident(modelFromRepo); _repo.SaveChanges(); return(NoContent()); }
public async Task DeleteResident(int residentId) => await _repo.DeleteResident(residentId);