How to: Specify Which Members are Tested for Concurrency Conflicts (LINQ to SQL)
Apply one of three enums to the LINQ to SQL UpdateCheck property on a ColumnAttribute attribute to specify which members are to be included in update checks for the detection of optimistic concurrency conflicts.
Original member values are compared with the current database state as long as no member is designated as IsVersion=true. For more information, see IsVersion.
For code examples, see UpdateCheck.
To always use this member for detecting conflicts
To never use this member for detecting conflicts
To use this member for detecting conflicts only when the application has changed the value of the member
The following example specifies that HomePage objects should never be tested during update checks. For more information, see UpdateCheck.
<Column(Storage:="_HomePage", DbType:="NText", UpdateCheck:=UpdateCheck.Never)> _ Public Property HomePage() As String Get Return Me._HomePage End Get Set(ByVal value As String) If ((Me._HomePage <> value) _ = false) Then Me.OnHomePageChanging(value) Me.SendPropertyChanging Me._HomePage = value Me.SendPropertyChanged("HomePage") Me.OnHomePageChanged End If End Set End Property