<p>In LinqToSql, it is lovely easy to load a row, change a column, and submit the changes to the database:</p>

<pre><code>using (MyDataContext wdc = new MyDataContext())
{        
  Article article = wdc.Article.First(p =&gt; p.ID == id);
  article.ItemsInStock = itemsinstock;
  wdc.SubmitChanges();
}
</code></pre>

<p>The only drawback: Article is huge. <strong>To load the entire article, just to update one column is way overkill</strong> and slows down my app significantly.</p>

<p>Is there a way to update a single column using LINQ, without having to load the entire row?</p>

<p>Right now I revert to using ExecuteCommand where speed is of essence, but this is ugly and error prone:</p>

<pre><code>wdc.ExecuteCommand("UPDATE Article SET ItemsInStock = @1 WHERE ID = @2", itemsinstock,id);
</code></pre>

You need to set UpdateCheck on all properties of the Article class except the primary key (click on the class property in LINQ2SQL designer and switch to Properties Tool Window) to Never (not sure about WhenChanged, maybe that works too - go ahead and experiment with it!).
This will force LINQ2SQL to use
```
```
UPDATE ... SET ... WHERE ID = @2
```
```
instead of the long version with all columns in the WHERE-clause:
```
```
UPDATE ... SET ... WHERE ID = @2 AND ItemsInStock = @1 AND SomeOtherColumn = @3 AND...
```
```
Now you can use code like
```
```
context.Articles.Attach(article /* article with updated values */, new Article { ID = articleID, ItemsInStock = -1 } /* pretend that this is the original article */);
context.SubmitChanges();
```
```
Basically you indicate that only ItemsInStock property has changed - other props should have the same default value, articleID of course being the same.
NOTE: you don't need to fetch the article prior to that.