Class SqlCommandExecutionContext
- Namespace
- LinqToDB.Internal.SqlProvider
- Assembly
- linq2db.dll
Threaded through the scenario interpreter; the single carrier of inter-step data. Holds one unified result value per step (rows-affected / scalar / output-parameter value / recordset marker), plus the typed rows-affected count of each executed NonQuery step. Gates, the outcome, and parameter forwarding read from it by explicit step index — nothing is pushed or declared by the producing step.
public sealed class SqlCommandExecutionContext
- Inheritance
-
objectSqlCommandExecutionContext
- Extension Methods
Constructors
SqlCommandExecutionContext(int, object?[]?)
Creates a context sized for stepCount steps.
public SqlCommandExecutionContext(int stepCount, object?[]? parameters = null)
Parameters
stepCountintNumber of steps in the scenario.
parametersobject[]The compiled-query argument array, or null for a regular query.
Properties
Parameters
The compiled-query argument array (null for a regular query). Carried on the context so it need
not be threaded as a separate object?[]? argument alongside the context; the row mapper and parameter
accessors read it from here.
public object?[]? Parameters { get; }
Property Value
- object[]
Methods
GetResult(int)
Gets the recorded result value of a step (null if not executed).
public object? GetResult(int step)
Parameters
stepint
Returns
- object
SetResult(int, object?)
Records the result value of a step and marks it executed.
public void SetResult(int step, object? value)
Parameters
stepintvalueobject
WasExecuted(int)
Whether the step has executed.
public bool WasExecuted(int step)
Parameters
stepint