Multiple LLBLGen projects within the one VS solution

Posts   
 
    
Jamanga
User
Posts: 93
Joined: 21-Jul-2006
# Posted on: 10-Aug-2016 09:39:47   

Hi team

I'm running the latest LLBLGen 4.2 using the adapter architecture + VS 2013 + Windows 7. I've changed the db on the fly for another project where they both had the same schema (and hence could re-use the entities), however this time it's a bit different.

I want to combine 2 projects within the same ASP.NET project and am wondering if this will work? They obviously have different namespaces for the DataAccessAdapter and other classes that share the same name - so I'm thinking as long as I use usercontrols where there is shared info. on the same page - I think it should work ok?

Any thoughts appreciated, and as usual thanks for such a useful product.

Regards, James

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 10-Aug-2016 11:40:20   

yeah, that's totally fine. Our test solution has many generated projects so it works OK simple_smile You should look into changing Connection string key name pattern under 'Entity model -> code generation' in the project settings so they both use a unique connection string name, so you can have two connection strings in your application's config file without a problem. If they connect to the same database server, you can of course keep the default and just use 1 connection string.

If you need to use e.g. DataAccessAdapter of two projects into one class, you can alias one or both using the 'using' statement in C#, so you don't get a conflict simple_smile

One caveat: the framework static variables defined on e.g. EntityBase2, are global per appdomain, so setting them in 1 project also means they're used in the other. In general this is OK though as they're not used a lot and are global anyway.

Frans Bouma | Lead developer LLBLGen Pro