public ActionResult DeleteHouse(int id) { var modelFromRepo = _repo.GetHouseById(id); if (modelFromRepo == null) { return(NotFound()); } _repo.DeleteHouse(modelFromRepo); _repo.SaveChanges(); return(NoContent()); }
public ActionResult DeleteHouse(int id) { var modelFromRepo = _repo.GetHouseById(id); if (modelFromRepo == null) { return(NotFound()); } _repo.DeleteHouse(modelFromRepo); _repo.SaveChanges(); return(NoContent()); }