public static void Delete(int id) { dal.Delete(id); ProductTypeAttributeBLL.DeleteList(id); ProductTypeStandardBLL.DeleteList(id); CacheHelper.Remove(cacheKey); }
// GET: ProductTypeController/Delete/5 public ActionResult Delete(int id) { var productType = _repo.Find(id); if (productType == null) { return(NotFound()); } var isSuccess = _repo.Delete(productType); if (!isSuccess) { return(BadRequest()); } return(RedirectToAction(nameof(Index))); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int id) { return(dal.Delete(id)); }