May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Deleting an entity works similarly to update, at least for retrieving the entity instance. Deletion is performed by invoking the DeleteOnSubmit method, which works opposite to the InsertOnSubmit. The following is an example, which also checks if the entity exists:

Remember how the custom SaveChanges method invokes the NorthwindDataContext.SubmitChanges one. The following code shows invoking the previous method for performing a product deletion:

Similarly to InsertAllOnSubmit, you can also invoke DeleteAllOnSubmit to remove multiple ...
Read now
Unlock full access