Exemplo n.º 1
0
        /// <summary>
        /// 异步删除
        /// </summary>
        /// <param name="condition">删除条件</param>
        /// <returns>受影响的行数</returns>
        public Task <int> DeleteAsync(Expression <Func <T, bool> > condition)
        {
            SqlQuery query = SqlQueryUtil.BuilderDeleteSqlQuery(condition, TableName, dbType: WriterDataType);

            return(GetDataAccess().ExecuteNonQueryAsync(query));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="condition">删除条件</param>
        /// <returns>受影响的行数</returns>
        public int Delete(object condition)
        {
            SqlQuery query = SqlQueryUtil.BuilderDeleteSqlQuery(condition, TableName, dbType: WriterDataType);

            return(GetDataAccess().ExecuteNonQuery(query));
        }