public ActionResult DeleteDeal(int id) { var dealModelFromRepo = _repository.GetDealById(id); if (dealModelFromRepo == null) { return(NotFound()); } _repository.DeleteDeal(dealModelFromRepo); _repository.SaveChanges(); return(NoContent()); }
public IActionResult Delete(int id) { dealRepository.DeleteDeal(id); return(new OkResult()); }