May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Updating existing entities is even easier than adding new ones. First, you need to catch the instance of the entity you want to update. When you get the instance, you simply edit its properties and then invoke the DataContext.SubmitChanges method. The following code provides an example:

This method requires an instance of the Product entity to be updated. To get an instance of the desired product, you can still take advantage of a lambda, but this time exception handling is reverted, as you can see from the following snippet:
When the NorthwindDataContext.SubmitChanges method is invoked, data is updated also to the underlying ...
Read now
Unlock full access