Code Generetion Templates

Posts   
 
    
mutlu
User
Posts: 14
Joined: 24-Jul-2007
# Posted on: 24-Jul-2007 11:26:07   

Hi,

we think about to use LLBLGEN Pro ORM tool, but we need to extend self servicing generation template with some adapter template features. How can we see this before we purchase the product. before purchasing because we must see that some issues are fit by LLBLGEN Pro without much effort.

We need to use more than one database at the same time. So, we should control (change - specialize) the data access point of the architecture. Also we want to take advantages of self servicing template like lazy loading and being more close to natural object oriented approach.

How could we see that the LLBLGen Pro solves our requirements before purchasing ??

Thanks...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 24-Jul-2007 18:42:09   

First things first: with 'we need to use more than one database at the same time', do you mean: single catalog project which is connecting per-call to multiple catalogs at runtime, or do you mean: I want to use catalog A, B and C in my project? Because that's supported for selfservicing as well (so you can add entities from A, B and C (or whatever how many catalogs you added to the project) to your project. (SQLServer specific).

However, if you mean the former, so you create a project on catalog A, and at runtime you want to select for call 1 to connect to catalog A but for call 2 you want to connect to catalog B etc. and that per thread, not globally, selfservicing will be hard to move to that paradigm. This is because selfservicing handles itself, so the object which controls the db activity is not available to you. Adapter has facilities to let you specify which db to connect to, per call, per thread, as the object which handles the activity, the DataAccessAdapter is available to you.

Frans Bouma | Lead developer LLBLGen Pro
mutlu
User
Posts: 14
Joined: 24-Jul-2007
# Posted on: 25-Jul-2007 11:03:20   

the first one, There is one catalog from which entities are genetared. But this catalog can exist at the different locations (replication between databases will also exist ). which location the program interact will be determined at the runtime due to configuration parameters and connection constraints (e.g. if location A not connected then save the object to location B).

the user manual tells that i can change - modify the code generation templates with SDK which will be available to me after purchasing the product.

I think that if i modify the "DaoBase" class which is base class of whole dao objects of the selfservicing model, i will solve the problem. Is this possible? will the source code available to me ? Or Does there exist a way to modify the data access point of the self servicing model?

Thanks...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 25-Jul-2007 11:37:44   

mutlu wrote:

the first one, There is one catalog from which entities are genetared. But this catalog can exist at the different locations (replication between databases will also exist ). which location the program interact will be determined at the runtime due to configuration parameters and connection constraints (e.g. if location A not connected then save the object to location B).

the user manual tells that i can change - modify the code generation templates with SDK which will be available to me after purchasing the product.

I think that if i modify the "DaoBase" class which is base class of whole dao objects of the selfservicing model, i will solve the problem. Is this possible? will the source code available to me ? Or Does there exist a way to modify the data access point of the self servicing model? Thanks...

You'll have the sourcecode of the runtime library available to you and you can change that code freely.

The selfservicing calls indeed end up in daobase, but the connection is created in DbUtils.cs/vb. Typically, the call to the Dao class ends up in the method DetermineConnectionToUse (which is in the generated code). There, it calls the DbUtils method DetermineConnectionTouse, which is static. It will check if it needs to use the connection of a live transaction or create a new one.

If your system is multi-user and all users have to connect to the same catalog, or your system is single user (desktop app) you can simply do the following: - overwrite the catalog name with "" in the config file (see Using the generated code: Application configuration through the config file) - set DbUtils.ActualConnectionString to the connection string which connects to the catalog you want to. This then happens for ALL connections

Frans Bouma | Lead developer LLBLGen Pro