Interface IContextEnvironment
Ambient context state and configuration: loggers, mapping mode and the user-owned property bag.
public interface IContextEnvironment
- Extension Methods
Properties
CommandLogger
The logger that traces executed SQL commands, or null when command logging is disabled.
ILogger? CommandLogger { get; }
Property Value
CommandTimeout
The context-wide default command timeout in seconds (see
DataContextBuilder.UseCommandTimeout), or null when no timeout is
configured and the provider default applies. A command can override it with
WithCommandTimeout. The default implementation returns null so existing
external implementations keep compiling.
int? CommandTimeout { get; }
Property Value
- int?
EagerLoadMode
The context-wide default eager-load strategy applied to LoadWith collections when a query
declares no explicit mode (see DataContextBuilder.UseEagerLoadMode). The default
implementation returns SplitQuery so existing external
implementations keep compiling and keep the historical behavior.
EagerLoadMode EagerLoadMode { get; }
Property Value
KeywordCase
The context-wide default case for SQL keywords (see DataContextBuilder.UseKeywordCase).
A command can override it with WithKeywordCase. The default implementation returns
Lower so existing external implementations keep compiling.
KeywordCase KeywordCase { get; }
Property Value
Logger
The general-purpose logger for the context, or null when logging is disabled.
ILogger? Logger { get; }
Property Value
MultilineBatchSql
Whether rendered batch SQL places each statement on its own line (see
DataContextBuilder.UseMultilineBatchSql). The default implementation returns
false so existing external implementations keep compiling and batch SQL stays
on a single line.
bool MultilineBatchSql { get; }
Property Value
NamingConvention
The context-wide default naming convention for auto-derived names (see
DataContextBuilder.UseNamingConvention). A command can override it with
WithNamingConvention. The default implementation returns null (names
are emitted verbatim) so existing external implementations keep compiling.
INamingConvention? NamingConvention { get; }
Property Value
NeedMapping
Whether rows returned by the provider must be mapped to results, as opposed to using a scalar or in-memory fast path.
bool NeedMapping { get; }
Property Value
Properties
A user-owned bag of arbitrary context properties, not interpreted by the engine.
Dictionary<string, object> Properties { get; }
Property Value
QueryFilterLogger
The logger category that reports global query-filter diagnostics (for example a filter skipped on a bound raw source), or null when logging is disabled. The default implementation returns null so existing external implementations keep compiling.
ILogger? QueryFilterLogger { get; }
Property Value
QuoteIdentifiers
The context-wide default for identifier quoting (see
DataContextBuilder.UseQuotedIdentifiers). A command can override it with
WithQuotedIdentifiers. The default implementation returns false so existing
external implementations keep compiling.
bool QuoteIdentifiers { get; }