Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
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)

public UpdateCheck UpdateCheck { get; set; }

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 string CustomerDesc
	{
		get
		{
			return this._CustomerDesc;
		}
		set
		{
			if ((this._CustomerDesc != value))
			{
				this.OnCustomerDescChanging(value);
				this.SendPropertyChanging();
				this._CustomerDesc = value;
				this.SendPropertyChanged("CustomerDesc");
				this.OnCustomerDescChanged();
			}
		}
	}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft