May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Deleting entities is also a simple task. You first need to get the instance of the entity you want to remove and then invoke the ObjectSet(Of T).DeleteObject method. The following code shows how to get the instance of the specified product and then to remove it first from the model and then from the database:

Same as in previous code, we take advantage of the Single method that throws an InvalidOperationException if the object does not exist.
Read now
Unlock full access