Exemplo n.º 1
0
        internal override void Execute(IDeleteCore core)
        {
            var sql = $"UPDATE {TableName} SET {CleanField} = NULL " + WhereStatment;

            core.AddExcuteOperation(String.Format("Очищаем ссылки в таблице {0}", TableName));
            core.ExecuteSql(sql, ItemId);
        }
Exemplo n.º 2
0
        internal override void Execute(IDeleteCore core, CancellationToken cancellation)
        {
            if (cancellation.IsCancellationRequested)
            {
                return;
            }

            ChildBeforeOperations.ForEach(o => o.Execute(core, cancellation));

            if (cancellation.IsCancellationRequested)
            {
                return;
            }

            core.AddExcuteOperation(String.Format("Удаляем из таблицы {0}", TableName));
            core.ExecuteSql(
                String.Format("DELETE FROM {0} {1}", TableName, WhereStatment),
                ItemId);

            if (cancellation.IsCancellationRequested)
            {
                return;
            }

            ChildAfterOperations.ForEach(o => o.Execute(core, cancellation));
        }
Exemplo n.º 3
0
        internal override void Execute(IDeleteCore core)
        {
            ChildBeforeOperations.ForEach(o => o.Execute(core));

            core.AddExcuteOperation(String.Format("Удаляем из таблицы {0}", TableName));
            core.ExecuteSql(
                String.Format("DELETE FROM {0} {1}", TableName, WhereStatment),
                ItemId);

            ChildAfterOperations.ForEach(o => o.Execute(core));
        }
Exemplo n.º 4
0
        internal override void Execute(IDeleteCore core, CancellationToken cancellation)
        {
            if (cancellation.IsCancellationRequested)
            {
                return;
            }

            var sql = $"UPDATE {TableName} SET {CleanField} = NULL " + WhereStatment;

            core.AddExcuteOperation(String.Format("Очищаем ссылки в таблице {0}", TableName));
            core.ExecuteSql(sql, ItemId);
        }