To ensure that all operations within a block are executed as a single transaction, wrap them in a ________ block.

  • TransactionScope
  • Transaction
  • Commit
  • Rollback
The correct option is "TransactionScope". In Entity Framework, a TransactionScope block ensures that all operations within it are executed as a single transaction. This means that either all the operations will be committed together, or if any operation fails, the entire transaction will be rolled back, ensuring data consistency. TransactionScope provides a convenient way to manage transactions in Entity Framework.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *