Class SqlColumnTypeDefinition<T, TDataRecord, TParameter>
Represents a generic definition of a column type.
public abstract class SqlColumnTypeDefinition<T, TDataRecord, TParameter> : SqlColumnTypeDefinition<T>, ISqlColumnTypeDefinition<T>, ISqlColumnTypeDefinition where T : notnull where TDataRecord : IDataRecord where TParameter : IDbDataParameterType Parameters
- T
- Underlying .NET type. 
- TDataRecord
- DB data record type. 
- TParameter
- DB parameter type. 
- Inheritance
- 
      
      
      
      SqlColumnTypeDefinition<T, TDataRecord, TParameter>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
SqlColumnTypeDefinition(ISqlDataType, T, Expression<Func<TDataRecord, int, T>>)
Creates a new SqlColumnTypeDefinition<T, TDataRecord, TParameter> instance.
protected SqlColumnTypeDefinition(ISqlDataType dataType, T defaultValue, Expression<Func<TDataRecord, int, T>> outputMapping)Parameters
- dataTypeISqlDataType
- Underlying DB data type. 
- defaultValueT
- Specifies the default value for this type. 
- outputMappingExpression<Func<TDataRecord, int, T>>
- Specifies the mapping of values read by IDataReader to objects of the specified RuntimeType. 
Properties
OutputMapping
Specifies the mapping of values read by IDataReader to objects of the specified RuntimeType. This LambdaExpression should have two parameters, where the first represents an IDataReader instance and the second represents an ordinal of the field from which to read the value.
public Expression<Func<TDataRecord, int, T>> OutputMapping { get; }Property Value
- Expression<Func<TDataRecord, int, T>>
Methods
SetParameterInfo(TParameter, bool)
Updates information of the provided parameter with this type's definition.
public virtual void SetParameterInfo(TParameter parameter, bool isNullable)Parameters
- parameterTParameter
- Parameter to update. 
- isNullablebool
- Specifies whether or not the - parametershould be marked as nullable.