public IResult Delete(int id) { try { _baseDal.Delete(new TEntity { Id = id }); return(new SuccessResult()); } catch (Exception e) { return(new ErrorResult(e.Message)); } }
/// <summary> /// 删除单条数据 /// </summary> /// <param name="entity"></param> /// <returns></returns> public virtual JsonModel Delete(int id) { JsonModel jsonModel = null; try { bool result = CurrentDal.Delete(CurrentEntity, id); jsonModel = new JsonModel() { errNum = 0, errMsg = "success", retData = result }; return(jsonModel); } catch (Exception ex) { jsonModel = new JsonModel() { errNum = 400, errMsg = ex.Message, retData = "" }; return(jsonModel); } }
/// <summary> /// 删除 /// </summary> /// <param name="WhereLambda">删除条件的lambda的表达式</param> /// <returns>符合此lambda的集合</returns> public int Delete(Expression <Func <TModel, bool> > WhereLambda) { //DbContextEnity.SaveChanges(); int Count = CurrentDal.Delete(WhereLambda); dbSession.SaveChanges(); return(Count); }
internal void Delete(int id) { Gelir _gelir = new Gelir(); _gelir.Id = id; ReturnValue = gelirDal.Delete(_gelir); if (ReturnValue > 0) { Helper.Message.Information("Kayıt Silindi."); } else { Helper.Message.Error("Silme işleminiz başarısız."); } }
internal void Delete(Kategori selectedKategori) { try { ReturnValue = kategoriDal.Delete(selectedKategori); } catch (Exception exception) { Helper.Message.Error(exception.Message); } if (ReturnValue > 0) { Helper.Message.Information("Silme işlemi başarılı"); } }
internal void Delete(AltKategori selectedAltKategori) { ReturnValue = 0; try { ReturnValue = _altKategoriDal.Delete(selectedAltKategori); if (ReturnValue > 0) { Helper.Message.Information("Kaydınız silindi."); } } catch (Exception exception) { Helper.Message.Error(exception.Message); } }
public async Task <IResult> Delete(TEntity entity) { IResult result; try { await _baseDal.Delete(entity); result = new SuccessResult("Deleting was succesed"); _identityId = _baseDal.SCOPE_IDENTY_ID; } catch (Exception ex) { result = new ErrorResult(ex.Message); } return(result); }
public virtual bool Delete(T model) { CurrentDal.Delete(model); return(dbSession.SaveChanges() > 0); }
public virtual void Delete(T model, bool isAdded) { basedal.Delete(model, isAdded); }
public void Delete(Brand brand) => _brandDal.Delete(brand);
public async Task <bool> Delete(T t) { return(await Task.Run <bool>(() => ibaseDal.Delete(t))); }
public void Delete(Car car) => _carDal.Delete(car);
public int Delete(T entity) { return(_dao.Delete(entity)); }
public void Delete(T entity) { dal.Delete(entity); DbSession.SaveChange(); }
public bool Delete(T entity) { CurrentDal.Delete(entity); return(dbSession.SaveChanges() > 0); }
public bool Delete(int id) { return(dbClient.Delete(id)); }
/// <summary> /// 删除 /// </summary> /// <param name="entity"></param> public virtual void Delete(T entity) { m_dal.Delete(entity); }
/// <summary> /// 删除某个对象 /// </summary> /// <param name="t"></param> /// <returns></returns> public int Delete(T t) { return(_dal.Delete(t)); }
/// <summary> /// /// </summary> /// <param name="entity"></param> /// <returns></returns> public bool Delete(T entity) { return(_dal.Delete(entity)); }
public virtual bool Delete(int id) { return(dal.Delete(id)); }
public void Delete(Color color) => _colorDal.Delete(color);
public virtual Boolean Delete(T entity) { return(Basedal.Delete(entity)); }
/// <summary> /// 删除 /// </summary> /// <param name="Entity"></param> /// <returns></returns> public bool Delete(T Entity) { currentDal.Delete(Entity); return(DBSession.SaveChanges() > 0); }
public void Delete(TEntity model, bool isaddedContext) { basedal.Delete(model, isaddedContext); }
public void Delete(long id) { var entity = _baseDal.GetById(id); _baseDal.Delete(entity); }