UpdateCheck
informs the data context when to verify that a member value in the database has not changed since it was retrieved. The following is the list of valid UpdateCheck
values:
Always
Never
WhenChanged
When performing an update without the existence of a dedicated version member, LINQ to SQL generates an UPDATE statement with a WHERE clause that includes the original column values. If the values do not match those in the database, no update occurs, and a conflict is detected, raising an exception.
The default value of UpdateCheck
is UpdateCheck.Always
. If set to UpdateCheck.Always
, conflict detection occurs even if the entity’s member value has not changed.
If the UpdateCheck
attribute property is set to UpdateCheck.Never
, the member does not participate in conflict detection. You can use this value to effectively switch off conflict detection for a particular member.
If the UpdateCheck
attribute property is set to UpdateCheck.WhenChanged
, conflict detection for the member occurs only if the value has changed in the entity object.
3.16.137.108