Example #1
0
 public static void Delete(int id)
 {
     dal.Delete(id);
     ProductTypeAttributeBLL.DeleteList(id);
     ProductTypeStandardBLL.DeleteList(id);
     CacheHelper.Remove(cacheKey);
 }
Example #2
0
        // 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)));
        }
Example #3
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(int id)
 {
     return(dal.Delete(id));
 }