On azure it's a special case, I didn't know this either, but learned about this recently. EF6 will have recovery/retry strategies and we plan to have them too in a future v4.x version. Azure apparently can drop the connection at any time and if you don't have retry strategy in place, you have to manually code recovery code.
It is planned, but it's not implemented yet.
Read Operation:
I am not sure how many DataAccessAdapter methods use read operations (all SELECT statements like fetch single, collection or scalar queries etc.)
It would be nice to inherits few virtual methods in DataAccessAdapter class, which connects to the database for reads operations, so the application can retry the query during transient failure. Would you please let me know the details?
Executeretrieval methods are the ones which execute the actual query and consume the datareader.
They contain a try/finally, which cleans up the dataconnection/reader.
Write Operation:
Please correct me if I am wrong... I believe that the write operation can be achieved by re-submitting "UnitOfWork2.Commit()" to the database again if there is only one UnitOfWork2 in the transaction, and there won't be any duplicate records in the database. However, if there are multiple UnitOfWork2 commit to the database in the same transaction - we have to re-submit all UnitOfWork2 to the database. Is it correct?
If Commit() fails, the whole transaction it is in rolls back, so previous commits in the same transaction which succeeded roll back too. You can use SaveTransaction to create save points between Commit() calls in the same transaction to rollback to that save point. You have to wrap the call to Commit() in a try/catch yourself, as you won't be passing true for 'autocommit' when calling Commit() as you have multiple calls to Commit() in the same transaction.