Microsoft
70-516 · Question #150
You ran a LINQ to SQL query to retrieve the products that you are going to mark as discontinued. After running the query, you looped through the returned products and set their Discontinued property…
The correct answer is D. Call the SubmitChanges method on the DataContext object. See the full explanation below for the reasoning.
Question
You ran a LINQ to SQL query to retrieve the products that you are going to mark as discontinued. After running the query, you looped through the returned products and set their Discontinued property to true. What must you do to ensure that the changes go back to the database?
Options
- ACall the Update method on the DataContext object.
- BNothing; the changes are sent when you modify the object.
- CCall the Dispose method on the DataContext object.
- DCall the SubmitChanges method on the DataContext object.
How the community answered
(42 responses)- A10% (4)
- B14% (6)
- C5% (2)
- D71% (30)
Community Discussion
No community discussion yet for this question.