Class T4TypeMapper
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
clrTypeNamestringThe 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
clrTypeNamestringThe 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
clrTypeNamestringThe 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
Returns
- string
The SQL Server type name.