Tortuga.Chain Namespace
Tortuga.Chain.CommandBuilders Namespace
Tortuga.Chain.Metadata Namespace

DatabaseMetadataCache<(Of <(<'TObjectName, TDbType>)>)>..::..ToClrType Method (String, Boolean, Nullable<(Of <(<'Int32>)>)>, Nullable<(Of <(<'Boolean>)>)>)

Returns the CLR type that matches the indicated database column type.

Namespace:  Tortuga.Chain.Metadata
Assembly:  Tortuga.Chain.Core (in Tortuga.Chain.Core.dll)

Syntax


public Nullable<Type> ToClrType(
	string typeName,
	bool isNullable,
	Nullable<int> maxLength,
	Nullable<bool> isUnsigned
)
Public Function ToClrType ( _
	typeName As String, _
	isNullable As Boolean, _
	maxLength As Nullable(Of Integer), _
	isUnsigned As Nullable(Of Boolean) _
) As Nullable(Of Type)
public:
Nullable<Type^> ToClrType(
	String^ typeName, 
	bool^ isNullable, 
	Nullable<int^> maxLength, 
	Nullable<bool^> isUnsigned
)

Parameters

typeName
Type: String
Name of the database column type.
isNullable
Type: Boolean
If nullable, Nullable versions of primitive types are returned.
maxLength
Type: Nullable<(Of <(<'Int32>)>)>
Optional length. Used to distinguish between a char and string.
isUnsigned
Type: Nullable<(Of <(<'Boolean>)>)>
Indicates whether or not the column is unsigned. Only applicable to some databases.

Return Value

A CLR type or NULL if the type is unknown.

Remarks


Use RegisterType to add a missing mapping or override an existing one.