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
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
ProviderInfo
The polygon provider.
public IPolyProvider ProviderInfo
Field Value
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
Methods
Add(SqlCommand)
Adds command.
public void Add(SqlCommand command)
Parameters
command
SqlCommandThe command to add.
Add(SqlCommand, Action<DbDataReader>)
Adds command.
public void Add(SqlCommand command, Action<DbDataReader> callbackAction)
Parameters
command
SqlCommandThe 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
SqlCommandThe 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
CancellationTokenA token that allows processing to be cancelled.
Returns
- Task
An asynchronous result.
GetBaseCommand(DbCommand)
Gets base command.
public SqlCommand GetBaseCommand(DbCommand command)
Parameters
command
DbCommandThe 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
DbConnectionThe connection.
transaction
DbTransactionThe transaction.
Exceptions
- Exception
Thrown when an exception error condition occurs.