Skip to main content

SqlMapper.ITypeMap

Implement this interface to change default mapping of reader columns to type members

Assembly: ServiceStack.OrmLite.dll​
View Source​
Declaration
public interface ITypeMap

Methods​

FindConstructor(String[], Type[])​

Finds best constructor

View Source​
Declaration
ConstructorInfo FindConstructor(string[] names, Type[] types)
Returns​

ConstructorInfo: Matching constructor or default one

Parameters​
TypeNameDescription
System.String[]namesDataReader column names

| | Type[] | types | DataReader column types

|

FindExplicitConstructor()​

Returns a constructor which should always be used.

Parameters will be default values, nulls for reference types and zero'd for value types.

Use this class to force object creation away from parameterless constructors you don't control.

View Source​
Declaration
ConstructorInfo FindExplicitConstructor()
Returns​

ConstructorInfo

GetConstructorParameter(ConstructorInfo, String)​

Gets mapping for constructor parameter

View Source​
Declaration
SqlMapper.IMemberMap GetConstructorParameter(ConstructorInfo constructor, string columnName)
Returns​

ServiceStack.OrmLite.Dapper.SqlMapper.IMemberMap: Mapping implementation

Parameters​
TypeNameDescription
ConstructorInfoconstructorConstructor to resolve

| | System.String | columnName | DataReader column name

|

GetMember(String)​

Gets member mapping for column

View Source​
Declaration
SqlMapper.IMemberMap GetMember(string columnName)
Returns​

ServiceStack.OrmLite.Dapper.SqlMapper.IMemberMap: Mapping implementation

Parameters​
TypeNameDescription
System.StringcolumnNameDataReader column name

|