Advice on naming and using Self Servicing or Adapter please!

Posts   
 
    
JMitchell avatar
JMitchell
User
Posts: 128
Joined: 01-Sep-2006
# Posted on: 14-Dec-2006 17:12:06   

I am setting up a large project that is aiming to combine two separate existing projects, each with their own database.

The databases are both fairly large and have some duplication in the table names. If I simply create a LLBLGen Pro 2.0 project with the two databases, I end up with entity names like Customer and Customer_

Does anyone have any advice as to how best to set up my LLBLGen project? Can you automatically prefix the database name to all entities? Would this be sensible.

The old projects used VB.NET 2003 and LLBLGen Pro v1.0 - We are looking to use VS2005 and LLBLGen Pro v2.0

We are also thinking about moving over from Self Servicing to Adapter. I've played around with this and am becoming more comfortable with it. Would you recommend using Self Servicing rather than Adapter or am I making a mistake in this move?

Thanks,

James

Posts: 1268
Joined: 10-Mar-2006
# Posted on: 14-Dec-2006 22:14:25   

Why not have two LLBLGen projects? Each generating to their own namespace?

Then you could use DAL.DB1.Customer and DAL.DB2.Customer

The self servicing and adapter debate is widely discussed on this forum. Each has their own advantages.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 15-Dec-2006 10:00:19   

For this particular case I second Wayne's opinion. Better to use 2 LLBLGen Pro projects.

JMitchell avatar
JMitchell
User
Posts: 128
Joined: 01-Sep-2006
# Posted on: 15-Dec-2006 10:26:24   

Thanks Wayne and Walaa, so would I generate the code in two places and include both projects in my main solution? I assume I wouldn't generate them to the same directory!

What would I do about the connection string in the GUI project's app.config?

Thanks again,

James

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 15-Dec-2006 12:42:41   

JMitchell wrote:

Thanks Wayne and Walaa, so would I generate the code in two places and include both projects in my main solution? I assume I wouldn't generate them to the same directory!

What would I do about the connection string in the GUI project's app.config?

Thanks again,

James

In the project properties (right click the project node in project explorer) you can define the name under which the connection string is stored. By default this is Main.ConnectionString, but you can choose any name, so for example DB1.ConnectionString in project 1 and DB2.ConnectionString in project 2. You then store both the connectionstrings in the config file with these two names instead of Main.Connectionstring.

Frans Bouma | Lead developer LLBLGen Pro