Here's one I will not probably remember the next time I need it.

A coworker was trying to use a DAL i generated in LLBLGen against a staging database on the same SQL Server as the production database the DAL was generated against.  If you look at the generated code you will see that the reference to the database is hardcoded. 

Turns out there is a way to tell LLBLGen to ingnore the hardcoded entry and use the catalog indicated in the connectionstring instead.

In your app.config or web.config file of your application project (not the llblgen project), add the following configuration:

<configSections>

     <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueSectionHandler" />

</configSections>

<sqlServerCatalogNameOverwrites>

     <add key="myProdDB" value="" />

</sqlServerCatalogNameOverwrites>

In this example, the blank value (value = "") tells llblgen to just use whatever catalog is indicated in the connectionstring.  You could put the name of the new database in there and it will ALWAYS redirect to that database.

Additionally, Somewhere in your code that is calling your llblgen classes will need to include this line to set the connectionstring:

DbUtils.ActualConnectionString = "Data Source=mySQLServer;Initial Catalog=myDatabase_Staging;Persist Security Info=True;User ID=xxx;password=xxxxxxxxxx!"

Where myDatabase_Staging is the name of the database you want it to point to instead of the one you built your LLBLGen classes against.