internal static Task<int> DeleteByIdsAsync<T>(this IDbCommand dbCmd, IEnumerable idValues, 
            Action<IDbCommand> commandFilter, CancellationToken token)
        {
            var sqlIn = dbCmd.SetIdsInSqlParams(idValues);
            if (string.IsNullOrEmpty(sqlIn))
                return TaskResult.Zero;

            var sql = OrmLiteWriteCommandExtensions.GetDeleteByIdsSql<T>(sqlIn, dbCmd.GetDialectProvider());

            return dbCmd.ExecuteSqlAsync(sql, commandFilter, token);
        }
コード例 #2
0
        internal static Task <int> DeleteByIdsAsync <T>(this IDbCommand dbCmd, IEnumerable idValues, CancellationToken token)
        {
            var sqlIn = idValues.GetIdsInSql();

            if (sqlIn == null)
            {
                return(TaskResult.Zero);
            }

            var sql = OrmLiteWriteCommandExtensions.GetDeleteByIdsSql <T>(sqlIn, dbCmd.GetDialectProvider());

            return(dbCmd.ExecuteSqlAsync(sql, token));
        }