C# Class nHydrate.Generator.Common.GeneratorFramework.ModelHelper

Show file Open project: nHydrate/nHydrate Class Usage Examples

Public Methods

Method Description
CodeNullableTypeIsNative ( System type ) : bool

Determines if the nullable type in code is native like 'string' or made up of a composite type like 'decimal?'

DefaultIsString ( System type ) : bool
DefaultValueCodeString ( System type ) : string
GetSQLDefault ( System dataType, string defaultValue ) : string

Gets the SQL equivalent for this default value

IsBinaryType ( System type ) : bool

Determines if the data type is a database character type of Binary,Image,VarBinary

IsDateType ( System type ) : bool

Determines if the data type is a database character type of DateTime,DateTime2,DateTimeOffset,SmallDateTime

IsDecimalType ( System type ) : bool

Determines if the data type is a database type of Decimal,Float,Real

IsIntegerType ( System type ) : bool

Determines if the data type is a database type of Int,BigInt,TinyInt,SmallInt

IsMoneyType ( System type ) : bool

Determines if the data type is a database type of Money,SmallMoney

IsNumericType ( System type ) : bool

Determines if the type is a number wither floating point or integer

IsTextType ( System type ) : bool

Determines if the data type is a database character type of Char,NChar,NText,NVarChar,Text,VarChar,Xml

SupportsMax ( System type ) : bool

Determines if this type supports the MAX syntax in SQL 2008

VariableLengthType ( System type ) : bool

Method Details

CodeNullableTypeIsNative() public static method

Determines if the nullable type in code is native like 'string' or made up of a composite type like 'decimal?'
public static CodeNullableTypeIsNative ( System type ) : bool
type System
return bool

DefaultIsString() public static method

public static DefaultIsString ( System type ) : bool
type System
return bool

DefaultValueCodeString() public static method

public static DefaultValueCodeString ( System type ) : string
type System
return string

GetSQLDefault() public static method

Gets the SQL equivalent for this default value
public static GetSQLDefault ( System dataType, string defaultValue ) : string
dataType System
defaultValue string
return string

IsBinaryType() public static method

Determines if the data type is a database character type of Binary,Image,VarBinary
public static IsBinaryType ( System type ) : bool
type System
return bool

IsDateType() public static method

Determines if the data type is a database character type of DateTime,DateTime2,DateTimeOffset,SmallDateTime
public static IsDateType ( System type ) : bool
type System
return bool

IsDecimalType() public static method

Determines if the data type is a database type of Decimal,Float,Real
public static IsDecimalType ( System type ) : bool
type System
return bool

IsIntegerType() public static method

Determines if the data type is a database type of Int,BigInt,TinyInt,SmallInt
public static IsIntegerType ( System type ) : bool
type System
return bool

IsMoneyType() public static method

Determines if the data type is a database type of Money,SmallMoney
public static IsMoneyType ( System type ) : bool
type System
return bool

IsNumericType() public static method

Determines if the type is a number wither floating point or integer
public static IsNumericType ( System type ) : bool
type System
return bool

IsTextType() public static method

Determines if the data type is a database character type of Char,NChar,NText,NVarChar,Text,VarChar,Xml
public static IsTextType ( System type ) : bool
type System
return bool

SupportsMax() public static method

Determines if this type supports the MAX syntax in SQL 2008
public static SupportsMax ( System type ) : bool
type System
return bool

VariableLengthType() public static method

public static VariableLengthType ( System type ) : bool
type System
return bool