Scenario: Multiple XAF databases, just 1 .config file, and i'm setting the ConnectionString at runtime.
Problem: I have 5 databases. Each time i must update my app, i must create 5 .config files, and pass each one to the DBUpdater tool. Also, each time i create a new database, i must remember to create one more .config file with its connection string.
Proposed Solution:
Being able to pass a ConnectionString directly to DBUpdater, so i can read all available connection strings from a source (XML for example), and do a foreach passing them to DBUpdater, doing a batch of updates on all databases.
We have closed this ticket because another page addresses its subject:
How to avoid NullReferenceException in the CreateDefaultObjectSpaceProvider method when DBUpdater tool is usedDBUpdater - Provide the capability to pass a connection string as a parameter
Answers
I have implemented this suggestion in 12.2. Starting with this version you can use an optional '-connectionString' parameter followed with a custom connection string that will be used by the DBUpdater instead of the ones specific in the application configuration file or application itself.
Here is an example of how to use the new parameter:
D:\2012.2\XAF\Demos\CS\MainDemo\MainDemo.Win\bin\Debug>DBUpdater.v12.2.exe MainD
emo.Win.exe.config -connectionString "Integrated Security=SSPI;Pooling=false;Dat
a Source=.\SQLEXPRESS;Initial Catalog=Test"