One of the great things about LINQ to SQL is that you can add additional properties to the auto-generated classes via partial classes. However, occasionally people will run into this exception: System.InvalidOperationExce... Cannot assign value to member 'XXX'. It does not define a setter. Why does this sometimes happen whereas other times the "extra" properties added via the partial class work perfectly? To answer this, let's take an example. Suppose we have a contacts class (I've left out the...
The code samples from my recent presentation at the Maryland CMAP code camp can be downloaded here: LINQ to SQL
This Saturday I'll be giving a presentation on LINQ to SQL at the Spring 2008 Maryland CMAP Code Camp: www.cmap-online.org/CodeCamp/