Closed Kobus-Smit closed 6 years ago
I would expect IDatabaseQuery to share the same transaction so it should see stuff. If its really a different transaction thats a bug to fix.
But if you've used UnitOfWork and committed stuff, the other connection should certainly see it since it's not running in serializable mode.
So my first assumption would be that your function doesn't work correctly :)
As far as the Execute is concerned, ideally there could be some alternative APIs which could control more arguments and in the end specify kind of connection it uses.
So try with some simpler SQL to verify that you can see the data, either with this code, or certainly with UOW.
Yep I had a typo in the qry.Execute :)
I want to create some aggregate roots and then call Postgres function to process them, but the Postgres function does not see them because
Execute
function is stillInTransaction
I've tried wrapping it in a
serviceProvider.DoWork
and callinguow.Commit
but that did not work because it is still in the other transaction.How do I commit the transaction from within the
Execute
function or is there a way to execute aIServerService
without a transaction?