Multiple generated projects in one application

Posts   
 
    
Findev
User
Posts: 103
Joined: 08-Dec-2014
# Posted on: 24-Jun-2018 10:23:39   

Hi,

I've seen some similar questions and just wanted to confirm that if through one application I use two (or more) generated projects (via different independent LLBLGen project files) targeting: a) same database, different tables b) different databases

it is safe to do so. I quickly tried the a) scenario, it seems to work. However, because I'm unfamiliar with the internal implementation I'd like to ensure that I won't run into quirks because of static variables or some other nuances.

Thank you!

P.S.: v5.4

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 25-Jun-2018 08:07:45   

Hi Findev,

Sure, you can use scenario B. When you create your projects, be sure to change the connectionString key pattern, so you have different connection strings, one for each DB. Also, when using both generated projects in your own project, use the namespaces correctly to identify each generated project.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 25-Jun-2018 09:27:37   

Indeed, connection string pattern is key and the root namespace you specify when generating code. Static variables/data is stored per type, so if the root namespace differs, you'll get different instances at runtime and nothing will conflict. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Findev
User
Posts: 103
Joined: 08-Dec-2014
# Posted on: 25-Jun-2018 10:47:47   

Yeah, the first thing I made sure is that connection strings and namespaces are unique simple_smile ATM going with the same db-two projects scenario, thus having a single sqlservercatalogname override entry, but I guess when I move those tables to another db, then I will just need to update the existing connection string and add a new catalog name override entry.

Thank you! simple_smile