public ActionResult Delete(int id) { try { _unitTypeService.Delete(_unitTypeService.GetById(id)); SuccessNotification("Kayıt Silindi"); return(RedirectToAction("UnitTypeIndex")); } catch { return(View()); } }
public IHttpActionResult DeleteUnitType(int id) { UnitType s_UnitType = _UnitTypeService.GetById(id); if (s_UnitType == null) { return(NotFound()); } _UnitTypeService.Delete(s_UnitType); return(Ok(s_UnitType)); }