Class DapperQueryOptions
- Namespace
- Savvyio.Extensions.Dapper
- Assembly
- Savvyio.Extensions.Dapper.dll
Specifies options that is related to DapperDataStore<T, TOptions>.
public class DapperQueryOptions : AsyncOptions, IAsyncOptions, IParameterObject
- Inheritance
-
DapperQueryOptions
- Implements
- Inherited Members
Constructors
DapperQueryOptions()
Initializes a new instance of the DapperQueryOptions class.
public DapperQueryOptions()
Remarks
The following table shows the initial property values for an instance of AsyncOptions.
| Property | Initial Value |
|---|---|
| CancellationToken | default |
| CommandTimeout | TimeSpan.FromSeconds(30) |
| CommandFlags | CommandFlags.Buffered |
| CommandType | CommandType.Text |
Properties
CommandFlags
Gets or sets the state flags against the command.
public CommandFlags CommandFlags { get; set; }
Property Value
- CommandFlags
The state flags against the command.
CommandText
Gets or sets the command (sql or a stored-procedure name) to execute.
public string CommandText { get; set; }
Property Value
- string
The command (sql or a stored-procedure name) to execute.
CommandTimeout
Gets or sets the timeout for the command.
public TimeSpan CommandTimeout { get; set; }
Property Value
- TimeSpan
The timeout for the command.
CommandType
Gets or sets the type of command that the command-text represents.
public CommandType CommandType { get; set; }
Property Value
- CommandType
The type of command that the command-text represents.
Parameters
Gets or sets the parameters associated with the command.
public object Parameters { get; set; }
Property Value
- object
The parameters associated with the command.
Remarks
This is typically the DTO.
Transaction
Gets or sets the active transaction for the command.
public IDbTransaction Transaction { get; set; }
Property Value
- IDbTransaction
The active transaction for the command.
Operators
implicit operator CommandDefinition(DapperQueryOptions)
Performs an implicit conversion from DapperQueryOptions to Dapper.CommandDefinition.
public static implicit operator CommandDefinition(DapperQueryOptions value)
Parameters
valueDapperQueryOptionsThe DapperQueryOptions to convert.
Returns
- CommandDefinition
A Dapper.CommandDefinition that is equivalent to
value.