PortableTypes

Classes > Migration > PortableTypes

Factory methods for portable types.

public static class PortableTypes

Properties

TinyInt

public static TinyIntType TinyInt { get; }

8-bit integer.

SmallInt

public static SmallIntType SmallInt { get; }

16-bit integer.

Int32

public static IntType Int32 { get; }

32-bit integer.

BigInt

public static BigIntType BigInt { get; }

64-bit integer.

Money

public static MoneyType Money { get; }

Currency type.

Float32

public static FloatType Float32 { get; }

32-bit float.

Float64

public static DoubleType Float64 { get; }

64-bit double.

NVarCharMax

public static NVarCharType NVarCharMax { get; }

Variable-length Unicode string with MAX length.

Text

public static TextType Text { get; }

Unlimited text.

VarBinaryMax

public static VarBinaryType VarBinaryMax { get; }

Variable-length binary with MAX length.

Blob

public static BlobType Blob { get; }

Unlimited binary.

Date

public static DateType Date { get; }

Date only.

DateTimeOffset

public static DateTimeOffsetType DateTimeOffset { get; }

DateTime with timezone.

RowVersion

public static RowVersionType RowVersion { get; }

Row version for concurrency.

Uuid

public static UuidType Uuid { get; }

UUID/GUID.

Boolean

public static BooleanType Boolean { get; }

Boolean.

Json

public static JsonType Json { get; }

JSON document.

Xml

public static XmlType Xml { get; }

XML document.

Int

public static IntType Int { get; }

32-bit integer (alias for Int32).

Float

public static FloatType Float { get; }

32-bit float (alias for Float32).

Double

public static DoubleType Double { get; }

64-bit double (alias for Float64).

Methods

DecimalNumber(int, int)

public static DecimalType DecimalNumber(int precision, int scale)

Decimal with precision and scale.

Parameters:

Name Type Description
precision Int32
scale Int32

Returns: DecimalType

FixedChar(int)

public static CharType FixedChar(int length)

Fixed-length string.

Parameters:

Name Type Description
length Int32

Returns: CharType

VarChar(int)

public static VarCharType VarChar(int maxLength)

Variable-length string.

Parameters:

Name Type Description
maxLength Int32

Returns: VarCharType

NChar(int)

public static NCharType NChar(int length)

Fixed-length Unicode string.

Parameters:

Name Type Description
length Int32

Returns: NCharType

NVarChar(int)

public static NVarCharType NVarChar(int maxLength)

Variable-length Unicode string.

Parameters:

Name Type Description
maxLength Int32

Returns: NVarCharType

Binary(int)

public static BinaryType Binary(int length)

Fixed-length binary.

Parameters:

Name Type Description
length Int32

Returns: BinaryType

VarBinary(int)

public static VarBinaryType VarBinary(int maxLength)

Variable-length binary.

Parameters:

Name Type Description
maxLength Int32

Returns: VarBinaryType

Time(int)

public static TimeType Time(int precision = 7)

Time with precision.

Parameters:

Name Type Description
precision Int32

Returns: TimeType

DateTime(int)

public static DateTimeType DateTime(int precision = 3)

DateTime with precision.

Parameters:

Name Type Description
precision Int32

Returns: DateTimeType

Enum(string, params string[])

public static EnumType Enum(string name, params string[] values)

Enum type.

Parameters:

Name Type Description
name String
values String[]

Returns: EnumType

Char(int)

public static CharType Char(int length)

Fixed-length string (alias for FixedChar).

Parameters:

Name Type Description
length Int32

Returns: CharType

Decimal(int, int)

public static DecimalType Decimal(int precision, int scale)

Decimal with precision and scale (alias for DecimalNumber).

Parameters:

Name Type Description
precision Int32
scale Int32

Returns: DecimalType