Current release of llblGen Pro; .NET 2.0; VS2005; SelfServicing 2 Classes; C#; SQL Server
My application serves multiple divisions. Each division has it's own database. Each division database has a different catalog name. Administrators use the application to log into any one division database at a time and will change from one division to another throughout the day. The connection strings for the division databases are read from a seperate "security" database at login and passed to the application. For this reason I can't override the catalog name in the generated code by using an app.config setting.
At first I thought this was going to make LLBLGen unusable for this project. I have discovered that if I replace all occurances of the catalog name with a null string in the generate code everything works just fine.
Example:
base.AddElementMapping( "CustomerEntity", "Testing", @"dbo", "Customer", 6 );
becomes
base.AddElementMapping( "CustomerEntity", "", @"dbo", "Customer", 6 );
Is there any danger in doing this? Is there a better way? I wish there was a way to do the override from code like there is with the connection string.