Share Transaction between different DataContext
Posted: Mon 04 May 2015 08:03
Hey
I think, the subject says all, I want to achieve.
I want to share a Transaction within different DataContext.
To get an idea, what I try to do:
I work with Dependency Injection. And I have a different contracts for customer, offer and so on.
Each of the contract has a "Save" Method. But, when within one of the Saves somesthing happens, None of the save methods is allowed to commit.
So, I thought having a Transaction object, which I can share would be the right Thing.
And there is one more Thing what you should have to know: I can't create a "new" object to run within. So, I have to late bind the Transaction - only when the save is called.
THX for any ideas to this
I think, the subject says all, I want to achieve.
I want to share a Transaction within different DataContext.
To get an idea, what I try to do:
I work with Dependency Injection. And I have a different contracts for customer, offer and so on.
Each of the contract has a "Save" Method. But, when within one of the Saves somesthing happens, None of the save methods is allowed to commit.
So, I thought having a Transaction object, which I can share would be the right Thing.
And there is one more Thing what you should have to know: I can't create a "new" object to run within. So, I have to late bind the Transaction - only when the save is called.
THX for any ideas to this