Class DataStatement
- Namespace
- Cuemon.Data
- Assembly
- Cuemon.Data.dll
Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database.
public class DataStatement
- Inheritance
-
DataStatement
Constructors
DataStatement(String, Action<DataStatementOptions>)
Initializes a new instance of the DataStatement class.
public DataStatement(string text, Action<DataStatementOptions> setup = null)
Parameters
text
StringThe command text to execute.
setup
Action<DataStatementOptions>The DataStatementOptions which may be configured.
Properties
Parameters
Gets the parameters associated with this data statement.
public IDataParameter[] Parameters { get; }
Property Value
- IDataParameter[]
The parameters associated with this data statement.
Text
Gets the command text to execute.
public string Text { get; }
Property Value
- String
The command text to execute.
Timeout
Gets the wait time before terminating the attempt to execute a command and generating an error.
public TimeSpan Timeout { get; }
Property Value
- TimeSpan
The timespan to wait for the command to execute. Default value is 1 minute and 30 seconds.
Type
Gets the command type value to execute.
public CommandType Type { get; }
Property Value
- CommandType
The command type value to execute. Default type value is Text.
Operators
Implicit(String to DataStatement)
Performs an implicit conversion from the specified text
to DataStatement.
public static implicit operator DataStatement(string text)
Parameters
text
StringThe SQL statement or stored procedure to convert.
Returns
- DataStatement
A DataStatement that is equivalent to
text
.