Automatic Concurrency Predicate checking?

Posts   
 
    
csmac3144
User
Posts: 74
Joined: 12-Sep-2007
# Posted on: 28-Oct-2007 07:39:22   

I am learning LLBLGen Pro and we are soon going to use it for a small project for a grocery store chain.

All of our SQL Server tables have a column called "Version" which is of type "timestamp". We want to use this for concurrency.

How can we have the code generator automatically include the check for this timestamp automatically for every table (entity) during save/update/delete?

I would like this to be automatic so that even if we used the ASP.Net LLBLGen datasource control and bound it to a GridView with LivePersistence on, it would be smart enough to detect an out-of-sync timestamp and throw an exception.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 28-Oct-2007 20:00:13   

Hi Steve,

If you are using LLBLGen v2.5 you can use Dependency Injection to inject your IConcurrencyPredicateFactory to your ConcurrencyPredicateFactoryToUse entity properties. (Read LLBLGenPro Help - Using generated code - Setting up and using Dependency Injection)

You can also use (advance feature) Include templates. (Read LLBLGenPro Help - Using generated code - your own code to the generated classes - Include templates).

David Elizondo | LLBLGen Support Team
csmac3144
User
Posts: 74
Joined: 12-Sep-2007
# Posted on: 28-Oct-2007 20:39:47   

OK David. That is more or less what I thought, however I wasn't sure if I was missing a basic feature.

I will now study these topics and will probably have some further questions.

Thanks!!

Steve