Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IColumnTypeBuilder<TNext>

    Builds a column type expression.

    Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Common
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public interface IColumnTypeBuilder<out TNext> : IFluentBuilder where TNext : IFluentBuilder
    Type Parameters
    Name Description
    TNext

    Methods

    View Source

    AsAnsiString()

    Sets the column type to an ANSI (non-Unicode) string.

    Declaration
    TNext AsAnsiString()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsAnsiString(int)

    Defines the column type as an ANSI string with the specified size.

    Declaration
    TNext AsAnsiString(int size)
    Parameters
    Type Name Description
    int size

    The maximum size of the ANSI string.

    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsBinary()

    Sets the column type to a binary data type.

    Declaration
    TNext AsBinary()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsBinary(int)

    Sets the column type to binary with the specified size in bytes.

    Declaration
    TNext AsBinary(int size)
    Parameters
    Type Name Description
    int size

    The maximum number of bytes for the binary column.

    Returns
    Type Description
    TNext

    An instance representing the next step in the column type builder chain.

    View Source

    AsBoolean()

    Sets the column type to boolean.

    Declaration
    TNext AsBoolean()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsByte()

    Specifies that the column should have a byte data type.

    Declaration
    TNext AsByte()
    Returns
    Type Description
    TNext

    The next step in the column type builder fluent interface.

    View Source

    AsCurrency()

    Specifies that the column should use a currency-compatible data type.

    Declaration
    TNext AsCurrency()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsCustom(string)

    Specifies a custom database column type for the column being defined.

    Declaration
    TNext AsCustom(string customType)
    Parameters
    Type Name Description
    string customType

    A string representing the custom database column type.

    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsDate()

    Sets the column type to a date type in the database schema.

    Declaration
    TNext AsDate()
    Returns
    Type Description
    TNext

    An object representing the next step in the migration expression.

    View Source

    AsDateTime()

    Sets the column type to DateTime.

    Declaration
    TNext AsDateTime()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsDecimal()

    Sets the column type to a decimal data type in the database schema.

    Declaration
    TNext AsDecimal()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsDecimal(int, int)

    Sets the column type to decimal with the specified size and precision.

    Declaration
    TNext AsDecimal(int size, int precision)
    Parameters
    Type Name Description
    int size

    The total number of digits that the decimal column can store.

    int precision

    The number of digits to the right of the decimal point.

    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsDouble()

    Sets the column type to a double-precision floating-point number.

    Declaration
    TNext AsDouble()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsFixedLengthAnsiString(int)

    Sets the column type to a fixed-length ANSI string of the specified size.

    Declaration
    TNext AsFixedLengthAnsiString(int size)
    Parameters
    Type Name Description
    int size

    The length of the fixed-length ANSI string column.

    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsFixedLengthString(int)

    Defines the column as a fixed length string with the specified size.

    Declaration
    TNext AsFixedLengthString(int size)
    Parameters
    Type Name Description
    int size

    The fixed length size of the string.

    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsFloat()

    Sets the database column type to a floating-point number.

    Declaration
    TNext AsFloat()
    Returns
    Type Description
    TNext

    The next builder in the expression chain.

    View Source

    AsGuid()

    Sets the column type to GUID (Globally Unique Identifier).

    Declaration
    TNext AsGuid()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsInt16()

    Sets the column type to Int16 (short).

    Declaration
    TNext AsInt16()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsInt32()

    Sets the column type to a 32-bit integer (Int32).

    Declaration
    TNext AsInt32()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsInt64()

    Sets the column type to Int64 (a 64-bit integer).

    Declaration
    TNext AsInt64()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsString()

    Sets the column type to a string (typically maps to a VARCHAR or NVARCHAR in the database).

    Declaration
    TNext AsString()
    Returns
    Type Description
    TNext

    An instance of TNext to continue building the column definition.

    View Source

    AsString(int)

    Specifies that the column should be of type string with a maximum length.

    Declaration
    TNext AsString(int size)
    Parameters
    Type Name Description
    int size

    The maximum number of characters allowed in the string column.

    Returns
    Type Description
    TNext

    An object representing the next step in the column type builder chain.

    View Source

    AsTime()

    Specifies that the column type should be set to a time data type.

    Declaration
    TNext AsTime()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsXml()

    Specifies that the column type should be XML.

    Declaration
    TNext AsXml()
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    View Source

    AsXml(int)

    Defines the column type as XML.

    Declaration
    TNext AsXml(int size)
    Parameters
    Type Name Description
    int size
    Returns
    Type Description
    TNext

    The next step in the column type builder chain.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX