70-516 · Question #16
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server database. The application uses DataContexts to…
The correct answer is D. Call the SubmitChanges method of the DataContext object. FailOnFirstConflict Specifies that attempts to update the database should stop immediately when the first concurrency conflict error is detected. ContinueOnConflict Specifies that all updates to the database should be tried, and that concurrency conflicts should be accumulated…
Question
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server database. The application uses DataContexts to query the database. The application meets the following requirements:
- Stores customer data offline.
- Allows users to update customer records while they are disconnected
from the server.
- Enables offline changes to be submitted back to the SQL Server by
using the DataContext object. You need to ensure that the application can detect all conflicts that occur between the offline customer information submitted to the SQL Server and the server version. You also need to ensure that you can roll back local changes. What should you do?
Options
- AAdd a try/catch statement around calls to the SubmitChanges method of the DataContext
- BAdd a try/catch statement around calls to the SubmitChanges method of the DataContext
- COverride the Update operation of the DataContext object.
- DCall the SubmitChanges method of the DataContext object.
How the community answered
(16 responses)- A13% (2)
- B6% (1)
- D81% (13)
Explanation
FailOnFirstConflict Specifies that attempts to update the database should stop immediately when the first concurrency conflict error is detected. ContinueOnConflict Specifies that all updates to the database should be tried, and that concurrency conflicts should be accumulated and returned at the end of the process. ExecuteDynamicUpdate() Method Called inside update override methods to redelegate to LINQ to SQL the task of generating and executing dynamic SQL for update operations. ConflictMode Enumeration DataContext.ExecuteDynamicUpdate Method us/library/system.data.linq.datacontext.executedynamicupdate.aspx)
Topics
Community Discussion
No community discussion yet for this question.