What other features are provided by LINQ to fine tuning concurrency at field level?

 Posted by ArticlesMaint on 9/29/2009 | Category: LINQ Interview questions | Views: 2845

One of the best options provided by LINQ concurrency system is control of concurrency behavior at field level. There are three options we can specify using the ‘UpdateCheck’ attribute: -

Never: - Do not use this field while checking concurrency conflicts.

Always: - This option specifies that always use this field to check concurrency conflicts.

WhenChanged :- Only when the member value has changed then use this field to detect concurrency conflicts.

Below is the code snippet which show how we can use the ‘UpdateCheck’ attribute to control property / field level concurrency options as specified above.

[Column(DbType = "nvarchar(50)",UpdateCheck=UpdateCheck.Never)]

public string CustomerCode
_CustomerCode = value;
return _CustomerCode;

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response