Table of Contents

Class T4TypeMapper

Namespace
JD.Domain.T4.Shims
Assembly
JD.Domain.T4.Shims.dll

Maps CLR type names to C# keywords and EF Core conventions.

public static class T4TypeMapper
Inheritance
T4TypeMapper
Inherited Members

Methods

IsCollection(string)

Determines if a type is a collection type.

public static bool IsCollection(string clrTypeName)

Parameters

clrTypeName string

The CLR type name.

Returns

bool

True if the type is a collection.

IsPrimitiveOrSimple(string)

Determines if a type is a primitive or simple type.

public static bool IsPrimitiveOrSimple(string clrTypeName)

Parameters

clrTypeName string

The CLR type name.

Returns

bool

True if the type is primitive or simple.

ToCSharpType(string)

Converts a CLR type name to a C# keyword where applicable.

public static string ToCSharpType(string clrTypeName)

Parameters

clrTypeName string

The CLR type name.

Returns

string

The C# type name.

ToSqlServerType(string, int?)

Gets the SQL Server type for a CLR type.

public static string ToSqlServerType(string clrTypeName, int? maxLength = null)

Parameters

clrTypeName string

The CLR type name.

maxLength int?

Optional max length for string types.

Returns

string

The SQL Server type name.