This project is read-only.

Transaction management enhancement request

Apr 8, 2013 at 5:37 PM
n order to speed up the creation of the large graph of objects, we have written a stored procedure. This gets hold of the ObjectContext to submit this through with a bit of jiggery pokery, using ((ObjectQuery)Container.Instances<Foo>).Context.

Using said Context, we can execute the sproc.


Although this works, the sproc is invoked in its own transaction; the NOF doesn't create a transaction until after the action has completed.

What we need, I think, is the ability for a domain object action to start the transaction early, e.g. by calling a new method on DomainObjectContainer.

Unless there's another way to do this already?

It would also be good for there to be a less hacky way to get hold of the ObjectContext. Perhaps that is also another method on DomainObjectContainer (though not sure what the signature should be, given that DOC ought not to have dependencies on EF API)?

Apr 11, 2013 at 3:37 PM
Edited Apr 11, 2013 at 3:39 PM
Per offline discussion (with John H), I don't know of any way to do what you are asking at present. It might be feasible to add new methods on the container as you suggest - but it might not necessarily be at all straightforward to implement - as it is not the Naked Objects transaction that needs to be kicked off early (that is kicked off at the start of the action), but, rather the EF transaction.

I've created an Issue - - for this so that it can be tracked as a request.