Export (0) Print
Expand All

ColumnAttribute.UpdateCheck Property

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

Namespace:  System.Data.Linq.Mapping
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

'Declaration
Public Property UpdateCheck As UpdateCheck

Property Value

Type: System.Data.Linq.Mapping.UpdateCheck
Default = Always, unless IsVersion is true for a member.
Other values are Never and WhenChanged.

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:

  • Always   Always use this column for conflict detection.

  • Never   Never use this column for conflict detection.

  • WhenChanged   Use this column only when the member has been changed by the application.

	<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

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft