Microsoft
70-516 · Question #149
You retrieved a row of data into an entity object by using a LINQ to SQL DataContext object. You haven't made any changes to the object, but you know that someone else has modified the data row in…
The correct answer is B. The changes are thrown out and you use the cached data, so you don't see the changes. See the full explanation below for the reasoning.
Question
You retrieved a row of data into an entity object by using a LINQ to SQL DataContext object. You haven't made any changes to the object, but you know that someone else has modified the data row in the database table, so you rerun your query, using the same LINQ to SQL DataContext object, to retrieve the updated data. What can be said about the result of the second query?
Options
- AIt returns the updated data and you can use it immediately.
- BThe changes are thrown out and you use the cached data, so you don't see the changes.
- CAn exception is thrown due to the difference in data.
- DAn exception is thrown because you already have the object, so you can't re-query unless
How the community answered
(27 responses)- A4% (1)
- B70% (19)
- C15% (4)
- D11% (3)
Community Discussion
No community discussion yet for this question.