예제 #1
0
        /// <summary>
        /// 按条件删除数据
        /// </summary>
        /// <param name="where">查询条件</param>
        public virtual void Delete(Expression <Func <TEntity, bool> > @where)
        {
            var objects = Dbset.Where(where);

            //foreach (TEntity obj in objects)
            Dbset.RemoveRange(objects);
        }