Microsoft
70-516 · Question #63
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application. You use the ADO.NET Entity Framework Designer to model entities. The application includes two…
The correct answer is B. using (TransactionScope scope = new TransactionScope()). TransactionScope.Complete Indicates that all operations within the scope are completed TransactionScope Class
Implementing Data Access
Question
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application. You use the ADO.NET Entity Framework Designer to model entities. The application includes two ObjectContext instances named context1 and context2. You need to persist the changes in both object contexts within a single transaction. Which code segment should you use?
Options
- Ausing (TransactionScope scope = new TransactionScope())
- Busing (TransactionScope scope = new TransactionScope())
- Cusing (TransactionScope scope = new TransactionScope())
- Dusing (TransactionScope scope = new TransactionScope())
How the community answered
(21 responses)- A5% (1)
- B81% (17)
- C5% (1)
- D10% (2)
Explanation
TransactionScope.Complete Indicates that all operations within the scope are completed TransactionScope Class
Topics
#TransactionScope#Entity Framework#distributed transaction#ObjectContext
Community Discussion
No community discussion yet for this question.