Search Results for

    Show / Hide Table of Contents
    View Source

    Struct SpecialDbType

    Allows for specifying custom DB types that are not natively mapped.

    Namespace: Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public struct SpecialDbType

    Constructors

    View Source

    SpecialDbType(string)

    Initializes a new instance of the SpecialDbType class using the specified database type.

    Declaration
    public SpecialDbType(string dbType)
    Parameters
    Type Name Description
    string dbType

    A string representing the special database type.

    View Source

    SpecialDbType(SpecialDbTypes)

    Initializes a new instance of the SpecialDbType class using the specified SpecialDbTypes value.

    Declaration
    public SpecialDbType(SpecialDbTypes specialDbTypes)
    Parameters
    Type Name Description
    SpecialDbTypes specialDbTypes

    A value indicating the special database types to be used by this instance.

    Properties

    View Source

    NCHAR

    Represents the special database type for a fixed-length Unicode character string (NCHAR).

    Declaration
    public static SpecialDbType NCHAR { get; }
    Property Value
    Type Description
    SpecialDbType
    View Source

    NTEXT

    Represents the NTEXT special database type, which was used for large Unicode text data in earlier versions of SQL Server. This member is obsolete; use NVARCHARMAX instead for new development, as NTEXT is deprecated in modern SQL Server versions.

    Declaration
    [Obsolete("Use NVARCHARMAX instead")]
    public static SpecialDbType NTEXT { get; }
    Property Value
    Type Description
    SpecialDbType
    View Source

    NVARCHARMAX

    Represents the special database type NVARCHAR(MAX), typically used for variable-length Unicode strings with no maximum length in SQL Server.

    Declaration
    public static SpecialDbType NVARCHARMAX { get; }
    Property Value
    Type Description
    SpecialDbType

    Methods

    View Source

    Equals(object?)

    Determines whether the specified object is equal to the current SpecialDbType instance.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current instance.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current instance; otherwise, false.

    View Source

    Equals(SpecialDbType)

    Determines whether the specified SpecialDbType is equal to the current instance.

    Declaration
    public bool Equals(SpecialDbType other)
    Parameters
    Type Name Description
    SpecialDbType other

    The SpecialDbType to compare with the current instance.

    Returns
    Type Description
    bool

    true if the specified SpecialDbType is equal to the current instance; otherwise, false.

    View Source

    GetHashCode()

    Returns a hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    View Source

    ToString()

    Returns the string representation of the special database type, as stored in the underlying _dbType field.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The string value of the special database type.

    Operators

    View Source

    operator ==(SpecialDbTypes, SpecialDbType)

    Declaration
    public static bool operator ==(SpecialDbTypes x, SpecialDbType y)
    Parameters
    Type Name Description
    SpecialDbTypes x
    SpecialDbType y
    Returns
    Type Description
    bool
    View Source

    implicit operator string(SpecialDbType)

    Declaration
    public static implicit operator string(SpecialDbType dbType)
    Parameters
    Type Name Description
    SpecialDbType dbType
    Returns
    Type Description
    string
    View Source

    operator !=(SpecialDbTypes, SpecialDbType)

    Declaration
    public static bool operator !=(SpecialDbTypes x, SpecialDbType y)
    Parameters
    Type Name Description
    SpecialDbTypes x
    SpecialDbType y
    Returns
    Type Description
    bool
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX