using (Transaction tr = dbObject.Database.TransactionManager.TopTransaction ?? dbObject.Database.TransactionManager.StartTransaction())
Except that a method that does that shouldn't dispose the TopTransaction, since it didn't start it. Doing that is pretty dangerous because if the transaction was started by a caller, the caller would be the one that commits it, but they can't do that if you dispose it for them.