public IActionResult Delete(int id) { PublicHouseView publicHouse = _service.Get(id); if (publicHouse != null) { _service.Remove(id); } return(Ok(publicHouse)); }
public ActionResult Delete(int id) { PublicHouseViewModel b = publicHouseService.Get(id); if (b == null) { return(HttpNotFound()); } publicHouseService.Remove(id); return(RedirectToAction("PublicHouses")); }