Class ReaderColumn
- Namespace
- Microsoft.EntityFrameworkCore.Storage
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
An expected column in the relational data reader.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public abstract class ReaderColumn
- Inheritance
-
ReaderColumn
- Derived
-
ReaderColumn<T>
- Inherited Members
Remarks
See Implementation of database providers and extensions for more information and examples.
Constructors
ReaderColumn(Type, bool, string?, IPropertyBase?)
Creates a new instance of the ReaderColumn class.
protected ReaderColumn(Type type, bool nullable, string? name, IPropertyBase? property)
Parameters
type
TypeThe CLR type of the column.
nullable
boolA value indicating if the column is nullable.
name
stringThe name of the column.
property
IPropertyBaseThe property being read if any, null otherwise.
Properties
IsNullable
A value indicating if the column is nullable.
public virtual bool IsNullable { get; }
Property Value
Name
The name of the column.
public virtual string? Name { get; }
Property Value
Property
The property being read if any, null otherwise.
public virtual IPropertyBase? Property { get; }
Property Value
- IPropertyBase
Type
The CLR type of the column.
public virtual Type Type { get; }
Property Value
Methods
Create(Type, bool, string?, IPropertyBase?, object)
Creates an instance of ReaderColumn<T>.
public static ReaderColumn Create(Type type, bool nullable, string? columnName, IPropertyBase? property, object readFunc)
Parameters
type
TypeThe type of the column.
nullable
boolWhether the column can contain null values.
columnName
stringThe column name if it is used to access the column values, null otherwise.
property
IPropertyBaseThe property being read if any, null otherwise.
readFunc
objectA
used to get the field value for this column.
Returns
- ReaderColumn
An instance of ReaderColumn<T>.