@kerry_w_brown wrote:
@vkpunique
@_gile
@ActivistInvestor
Yes, interpretation is important.
For some reason I may have misunderstood the time lapse for adding the additional entities.
I should have paid more attention to the post title " . . . between single transaction"
now I assume that should have read plural transactions and am wondering if the transactions are in the same assembly . . . or even in the same class. weird, hey!
added:
on fourth thought, perhaps it means "during a single transaction"
I should turn up my "vague identifier" I think.
I also didn't read the title, which partially-answers the question. The part not answered is whether the OP's code is creating the objects directly, or he is calling commands or some other way of indirectly creating new objects.
But, a constant point of frustration for me, is that I routinely see others hand the OP a fish, rather than endeavoring to help them learn how to catch fish. This thread may be another case in point.
Quite a bit of code I've written over the years routinely operates on newly-created objects (created by executing commands, or via some other means), and I don't have to (or can't) build a list of new objects, and don't have to resort to incrementing handles to find them.
I just use an ObjectOverrule and override Close(); check to see if the object is a new object; and if so, act on it right then and there, while it's open for write and about to be closed. End of story. No need to build a list of objects...No need to open those objects after-the-fact, because the operation was already done in the overrule's Close() override.
When I see a question like this one posted, the first thing I do is look beyond the question, to understand if what the OP thinks they need to do, is really what they need to do, and in many cases, it is not. They may believe it is, only because they're unaware of other/better ways of solving a problem, using things like Overrules, or don't understand how they can be leveraged to solve problems.
So, if the OP does respond with a clarification, I might offer some advice on how to best solve their problem, but otherwise, this is a guessing-game.