SQL-Context using Adapter and UnitOfWork2

Posts   
 
    
jwijnker
User
Posts: 32
Joined: 09-Mar-2011
# Posted on: 21-Dec-2011 11:28:05   

Using LLBLGen 3.1 and .Net4 I want to add additional user-info to the SQL-Context.

In the adapter there is no way to get the connection itself to add the information to the sql-context. (It's like http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=7711 but using adapter.)

Like Otis wrote in the thread mentioned above, it's possible to use a transaction, but while i'm using the Adapter method, there is no transaction class. An alternative is using a UnitOfWork(2). Is the UnitOfWork2 itself a transaction by itself?

Note: I posted this question also last monday (when the forum was moved) and this question got lost...??

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 21-Dec-2011 16:10:33   

Similar to the code snippet shown in the last post of the referenced thread. You can use a partial class of the DataAccessAdapter or derived from it , if this won't be used everywhere.

And there you can get to the created Transaction by overriding the **CreateNewPhysicalTransaction **method, call the base method first and then catch the returned Transaction to fiddle with it as you want. Same thing with the Connection (override CreateNewPhysicalConnection()).

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 21-Dec-2011 19:22:15   

I posted your question again, here: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=20532

it was answered as well.

Sorry for this confusion, we should have closed posting rights on the old forum sooner.

Frans Bouma | Lead developer LLBLGen Pro