You are developing a NET Core on premises application that updates multiple Azure SQL Database instances. The application must log all update commands attempted to a separate Azure SQL Database instance named AuditDb.
You define an outer TransactionScope with a loop to enumerate and run the SQL commands on each customer database connection and an inner TransactionScope to record transactions attempted within the outer TransactionScope to the AuditDb database.
You need to develop a method to perform the updates to the databases. The solution must meet the following requirements:
* All rows written to the AuditDb database must be committed even if the outer transaction fails.
* If an error occurs writing to the AuditDb database, the outer transaction must be rolled back.
* If an error occurs writing to the Customer databases, only the outer transaction must be rolled back.
* Values for TransactionScopeOption must be specified for the customer databases.
* Values for TransactionScopeOption must be specified for the AuditDb database.
Which TransactionScopeOption values should you use?
Currently there are no comments in this discussion, be the first to comment!