DefaultTypeMap
Represents default type mapping strategy used by Dapper
Assembly: ServiceStack.OrmLite.dll
View Source
Declaration
public sealed class DefaultTypeMap : object, SqlMapper.ITypeMap
Properties
MatchNamesWithUnderscores
Should column names like User_Id be allowed to match properties/fields like UserId ?
View Source
Declaration
public static bool MatchNamesWithUnderscores { get; set; }
Properties
The settable properties for this typemap
View Source
Declaration
public List<PropertyInfo> Properties { get; }
Methods
FindConstructor(String[], Type[])
Finds best constructor
View Source
Declaration
public ConstructorInfo FindConstructor(string[] names, Type[] types)
Returns
ConstructorInfo
: Matching constructor or default one
Parameters
Type | Name | Description |
---|---|---|
System.String[] | names | DataReader column names |
|
| Type[]
| types | DataReader column types
|
FindExplicitConstructor()
Returns the constructor, if any, that has the ExplicitConstructorAttribute on it.
View Source
Declaration
public ConstructorInfo FindExplicitConstructor()
Returns
ConstructorInfo
GetConstructorParameter(ConstructorInfo, String)
Gets mapping for constructor parameter
View Source
Declaration
public SqlMapper.IMemberMap GetConstructorParameter(ConstructorInfo constructor, string columnName)
Returns
ServiceStack.OrmLite.Dapper.SqlMapper.IMemberMap: Mapping implementation
Parameters
Type | Name | Description |
---|---|---|
ConstructorInfo | constructor | Constructor to resolve |
|
| System.String
| columnName | DataReader column name
|
GetMember(String)
Gets member mapping for column
View Source
Declaration
public SqlMapper.IMemberMap GetMember(string columnName)
Returns
ServiceStack.OrmLite.Dapper.SqlMapper.IMemberMap: Mapping implementation
Parameters
Type | Name | Description |
---|---|---|
System.String | columnName | DataReader column name |
|