RowVersion

Posts   
 
    
kulki
User
Posts: 26
Joined: 20-Dec-2004
# Posted on: 20-Dec-2004 23:40:12   

I would like to use a simple RowVersion int coulmn for optimistic concurruncy. I don't see an easy way to specify this in the designer that a field is used specifically for this purpose. Is there something I am missing here? What would be really useful is to have an example to show how to use this.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 21-Dec-2004 10:15:23   

Implement IConcurrencyPredicateFactory. An example of this is in the documentation. LLBLGen Pro doesn't have a buildin concurrency scheme which limits you to only use that scheme. Instead it provides an easy way to implement concurrency exactly the way you want it.

Frans Bouma | Lead developer LLBLGen Pro
kulki
User
Posts: 26
Joined: 20-Dec-2004
# Posted on: 23-Dec-2004 03:23:31   

Otis wrote:

Implement IConcurrencyPredicateFactory. An example of this is in the documentation. LLBLGen Pro doesn't have a buildin concurrency scheme which limits you to only use that scheme. Instead it provides an easy way to implement concurrency exactly the way you want it.

I am sorry but I looked in the documentation but could not find anything. I also searched on the forums but could not understand what was being said. Do we have to implement the IConcurrencyPredicateFactory for every single entity? I just have a simple rowversion int coulmn for concurruncy control. Cant I set up such that the codegenerator will automatically manage concurancy for me? I know you are trying to provide an generic approach but for my specefic case can I do something to simply my life.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 23-Dec-2004 09:20:31   

If I type in "IConcurrencyPredicateFactory" with the search in the docs I get 5 hits. simple_smile There are sections about Concurrency control in "Using the entity classes" in "Using the generated code / Selfservicing (or adapter)"

If each entity has the same rowtype column, you can simply implement 1 IConcurrencyPredicateFactory and stuff it inside each and every entity you create. Real soon (within 1 month) the templates are a bit changed so you can alter the initialisation code of an entity in an include template (the template system uses include templates ala the asp system) so it will be very easy to inject initialization of these objects in the generated code.

See also this thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=992

Frans Bouma | Lead developer LLBLGen Pro