Class SelectExpression
A single projected column of a query: its ordinal, the expression that produces it, the target property it maps to and the reader accessor used to materialize it.
[SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Static readonly reflection-metadata fields (GetInt32MI, ...) are intentionally PascalCase as immutable lookup tables; IDE1006 is a suggestion and is not enforced by the build.")]
public sealed class SelectExpression
- Inheritance
-
SelectExpression
- Inherited Members
- Extension Methods
Constructors
SelectExpression(Type)
Initializes a projected column for the given CLR type, deriving its nullability from the type.
public SelectExpression(Type propertyType)
Parameters
propertyTypeTypeThe CLR type of the value produced.
Fields
Nullable
Whether the CLR type can hold null (a reference type or a Nullable<T>).
public readonly bool Nullable
Field Value
Properties
Converter
The value converter applied to this column after reading and before materialization, or null when the column is read as-is.
public IPropertyValueConverter? Converter { get; set; }
Property Value
DefaultOnNull
True when a SQL NULL in this column means "no row" (the projection came from a
*OrDefault scalar terminal) and the column is a non-nullable value type, so the reader
must substitute default instead of throwing. Set while the projection is prepared;
read by the provider's column mapper.
public bool DefaultOnNull { get; }
Property Value
DurationPrecision
The fractional-second precision of a native duration type, or zero for the provider default.
public int DurationPrecision { get; set; }
Property Value
DurationUnit
The declared storage unit of a TimeSpan column on a provider without a native
duration type, or null for a native column. Populated from the entity property metadata;
the provider's column mapper decides whether it applies (see
SupportsNativeDuration).
public DurationUnit? DurationUnit { get; set; }
Property Value
Expression
The expression that produces the value, or null for a plain entity column.
public Expression? Expression { get; set; }
Property Value
Index
The zero-based ordinal of the column in the result set.
public int Index { get; set; }
Property Value
PropertyName
The target property name, or null for a positional projection.
public string? PropertyName { get; set; }
Property Value
PropertyType
The CLR type of the value produced.
public Type PropertyType { get; set; }
Property Value
ProviderType
The provider-side type Converter produces and reads, or null when the property is read as its CLR type. The reader selects its typed accessor from this type rather than PropertyType.
public Type? ProviderType { get; set; }
Property Value
Methods
GetDataRecordMethod()
Gets the reader accessor that reads a value of this column's type from a data record.
public MethodInfo GetDataRecordMethod()
Returns
- MethodInfo
The MethodInfo of the matching IDataRecord getter.