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