The IDbTransaction InterfaceMany of the methods exposed by a database provider are overloaded to allow for an implementation of the IDbTransaction interface. This enables the Data Access Application Block to perform multiple database operations within a single manual transaction. That is, it can ensure that either all database operations are successfully committed or none of the operations are. To provide support for this feature, any .NET managed data provider for use with the Data Access Application Block should implement the IDbTransaction interface. For the .NET managed data provider for XML files, the XmlFileTransaction class implements the IDbTransaction interface. Listing B.7 shows the code for this class. Listing B.7. XmlFileTransaction Class Implements IDbTransaction
|