Table of Contents

Class PolyCommandSet

Namespace
Z.EntityFramework.Extensions
Assembly
Z.EntityFramework.Extensions.dll

A polygon SQL command set.

public class PolyCommandSet
Inheritance
PolyCommandSet
Inherited Members

Constructors

PolyCommandSet()

public PolyCommandSet()

Fields

AllowUseExecute

True to allow, false to suppress the use execute.

public bool AllowUseExecute

Field Value

bool

CommandTimeout

The command timeout.

public int? CommandTimeout

Field Value

int?

Commands

The commands.

public List<Tuple<SqlCommand, PolyCommandSetCallbackAction>> Commands

Field Value

List<Tuple<SqlCommand, PolyCommandSetCallbackAction>>

Connection

The connection.

public SqlConnection Connection

Field Value

SqlConnection

PreserveOrder

True to preserve order.

public bool PreserveOrder

Field Value

bool

ProviderInfo

The polygon provider.

public IPolyProvider ProviderInfo

Field Value

IPolyProvider

Transaction

The transaction.

public SqlTransaction Transaction

Field Value

SqlTransaction

Properties

BatchSize

The maximum number of command to batches in one command.

public int BatchSize { get; set; }

Property Value

int

Methods

Add(SqlCommand)

Adds command.

public void Add(SqlCommand command)

Parameters

command SqlCommand

The command to add.

Add(SqlCommand, Action<DbDataReader>)

Adds command.

public void Add(SqlCommand command, Action<DbDataReader> callbackAction)

Parameters

command SqlCommand

The command.

callbackAction Action<DbDataReader>

The callback action.

Add(SqlCommand, Func<DbDataReader, Task>)

Adds command.

public void Add(SqlCommand command, Func<DbDataReader, Task> callbackActionAsync)

Parameters

command SqlCommand

The command.

callbackActionAsync Func<DbDataReader, Task>

The callback action async.

Combine()

Gets the combine.

public List<Tuple<SqlCommand, List<PolyCommandSetCallbackAction>>> Combine()

Returns

List<Tuple<SqlCommand, List<PolyCommandSetCallbackAction>>>

A List<Tuple<SqlCommand,List<Action<DbDataReader>>>>

Exceptions

Exception

Thrown when an exception error condition occurs.

Execute()

Executes this object.

public void Execute()

ExecuteAsync(CancellationToken)

Executes the asynchronous operation.

public Task ExecuteAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A token that allows processing to be cancelled.

Returns

Task

An asynchronous result.

GetBaseCommand(DbCommand)

Gets base command.

public SqlCommand GetBaseCommand(DbCommand command)

Parameters

command DbCommand

The command to add.

Returns

SqlCommand

The base command.

Exceptions

Exception

Thrown when an exception error condition occurs.

SetInfo(DbConnection, DbTransaction)

Sets an information.

public void SetInfo(DbConnection connection, DbTransaction transaction)

Parameters

connection DbConnection

The connection.

transaction DbTransaction

The transaction.

Exceptions

Exception

Thrown when an exception error condition occurs.