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.updatecheck below:

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

ColumnAttribute.UpdateCheck Property Definition

Gets or sets how LINQ to SQL approaches the detection of optimistic concurrency conflicts.

public:
 property System::Data::Linq::Mapping::UpdateCheck UpdateCheck { System::Data::Linq::Mapping::UpdateCheck get(); void set(System::Data::Linq::Mapping::UpdateCheck value); };
public System.Data.Linq.Mapping.UpdateCheck UpdateCheck { get; set; }
member this.UpdateCheck : System.Data.Linq.Mapping.UpdateCheck with get, set
Public Property UpdateCheck As UpdateCheck
Property Value

Default = Always, unless IsVersion is true for a member.

Other values are Never and WhenChanged.

Examples
[Column(Storage="_CustomerDesc", DbType="NText", UpdateCheck=UpdateCheck.Never)]
public string CustomerDesc
{
    get
    {
        return this._CustomerDesc;
    }
    set
    {
        if ((this._CustomerDesc != value))
        {
            this.OnCustomerDescChanging(value);
            this.SendPropertyChanging();
            this._CustomerDesc = value;
            this.SendPropertyChanged("CustomerDesc");
            this.OnCustomerDescChanged();
        }
    }
}
<Column(Storage:="_CustomerDesc", DbType:="NText", UpdateCheck:=UpdateCheck.Never)>  _
Public Property CustomerDesc() As String
    Get
        Return Me._CustomerDesc
    End Get
    Set
        If ((Me._CustomerDesc = value)  _
                    = false) Then
            Me.OnCustomerDescChanging(value)
            Me.SendPropertyChanging
            Me._CustomerDesc = value
            Me.SendPropertyChanged("CustomerDesc")
            Me.OnCustomerDescChanged
        End If
    End Set
End Property
Remarks

When this property is used with one of three enums, it determines how LINQ to SQL detects concurrency conflicts.

If no member is designed as IsVersion=true, original member values are compared with the current database state.

The following enums are available:

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