A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/api/system.data.linq.mapping.columnattribute.dbtype below:

ColumnAttribute.DbType Property (System.Data.Linq.Mapping) | Microsoft Learn

ColumnAttribute.DbType Property Definition

Gets or sets the type of the database column.

public:
 property System::String ^ DbType { System::String ^ get(); void set(System::String ^ value); };
public string DbType { get; set; }
member this.DbType : string with get, set
Public Property DbType As String
Property Value

String value that specifies the exact text that defines the column in a Transact-SQL table declaration.

Examples
[Column(Storage="_FirstName", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
public string FirstName
{
    get
    {
        return this._FirstName;
    }
    set
    {
        if ((this._FirstName != value))
        {
            this.OnFirstNameChanging(value);
            this.SendPropertyChanging();
            this._FirstName = value;
            this.SendPropertyChanged("FirstName");
            this.OnFirstNameChanged();
        }
    }
}
<Column(Storage:="_FirstName", DbType:="NVarChar(10) NOT NULL", CanBeNull:=false)>  _
Public Property FirstName() As String
    Get
        Return Me._FirstName
    End Get
    Set
        If ((Me._FirstName = value)  _
                    = false) Then
            Me.OnFirstNameChanging(value)
            Me.SendPropertyChanging
            Me._FirstName = value
            Me.SendPropertyChanged("FirstName")
            Me.OnFirstNameChanged
        End If
    End Set
End Property
Remarks

Use this property to specify the exact text that defines the column in a Transact-SQL table declaration. Specify the DbType property only if you plan to use CreateDatabase to create an instance of the database.

The default value of DbType is inferred from the member type. For more information, see SQL-CLR Type Mapping.

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4