This topic has not yet been rated - Rate this topic

How to: Specify Concurrency-Conflict Checking (LINQ to SQL)

You can specify which columns of the database are to be checked for concurrency conflicts when you call SubmitChanges. For more information, see How to: Specify Which Members are Tested for Concurrency Conflicts (LINQ to SQL).

The following code specifies that the HomePage member should never be tested during update checks. For more information, see UpdateCheck.


[Column(Storage="_HomePage", DbType="NText", UpdateCheck=UpdateCheck.Never)]
public string HomePage
{
    get
    {
        return this._HomePage;
    }
    set
    {
        if ((this._HomePage != value))
	{
 	    this.OnHomePageChanging(value);
	    this.SendPropertyChanging();
            this._HomePage = value;
	    this.SendPropertyChanged("HomePage");
            this.OnHomePageChanged();
	}
    }
}


Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.