Esempio n. 1
0
 public IResult Delete(int id)
 {
     try
     {
         _baseDal.Delete(new TEntity {
             Id = id
         });
         return(new SuccessResult());
     }
     catch (Exception e)
     {
         return(new ErrorResult(e.Message));
     }
 }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 4
0
        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.");
            }
        }
Esempio n. 5
0
 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ı");
     }
 }
Esempio n. 6
0
 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);
     }
 }
Esempio n. 7
0
        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);
        }
Esempio n. 8
0
 public virtual bool Delete(T model)
 {
     CurrentDal.Delete(model);
     return(dbSession.SaveChanges() > 0);
 }
Esempio n. 9
0
 public virtual void Delete(T model, bool isAdded)
 {
     basedal.Delete(model, isAdded);
 }
Esempio n. 10
0
 public void Delete(Brand brand) => _brandDal.Delete(brand);
Esempio n. 11
0
 public async Task <bool> Delete(T t)
 {
     return(await Task.Run <bool>(() => ibaseDal.Delete(t)));
 }
Esempio n. 12
0
 public void Delete(Car car) => _carDal.Delete(car);
Esempio n. 13
0
 public int Delete(T entity)
 {
     return(_dao.Delete(entity));
 }
Esempio n. 14
0
 public void Delete(T entity)
 {
     dal.Delete(entity);
     DbSession.SaveChange();
 }
Esempio n. 15
0
 public bool Delete(T entity)
 {
     CurrentDal.Delete(entity);
     return(dbSession.SaveChanges() > 0);
 }
Esempio n. 16
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);
 }
Esempio n. 18
0
 /// <summary>
 /// 删除某个对象
 /// </summary>
 /// <param name="t"></param>
 /// <returns></returns>
 public int Delete(T t)
 {
     return(_dal.Delete(t));
 }
Esempio n. 19
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public bool Delete(T entity)
 {
     return(_dal.Delete(entity));
 }
Esempio n. 20
0
 public virtual bool Delete(int id)
 {
     return(dal.Delete(id));
 }
Esempio n. 21
0
 public void Delete(Color color) => _colorDal.Delete(color);
Esempio n. 22
0
 public virtual Boolean Delete(T entity)
 {
     return(Basedal.Delete(entity));
 }
Esempio n. 23
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="Entity"></param>
 /// <returns></returns>
 public bool Delete(T Entity)
 {
     currentDal.Delete(Entity);
     return(DBSession.SaveChanges() > 0);
 }
Esempio n. 24
0
 public void Delete(TEntity model, bool isaddedContext)
 {
     basedal.Delete(model, isaddedContext);
 }
Esempio n. 25
0
        public void Delete(long id)
        {
            var entity = _baseDal.GetById(id);

            _baseDal.Delete(entity);
        }