Multiple LLBLGen Projects and Custom Entity Code

Posts   
 
    
Posts: 1268
Joined: 10-Mar-2006
# Posted on: 27-Mar-2008 21:14:44   

I am looking to see what everyone else is doing to solve the issues I am having around multiple projects.

If I have a pretty simple application, service, etc, I will create a NEW LLBLGen project and only put the entities that project needs. I then generate and am good to go. (Project A)

Then I have another project, perhaps a bit more complex, I do the same thing again. (Project B)

Then I have another project, perhaps a lot more complex, I do the same thing again. (Project C)

That is all fine. However, what I am running into is I will do some modifications to an Entity through partial classes. So, for example in project C you might code some modifications/enhancements to your entities/collections. Now, how do you get those changes in project A and B?

I could I guess have ONE giant DAL that is all things to all projects (ugh..) and that would solve it. I could copy and paste partial files around or??

What, if anything is everyone else doing?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 28-Mar-2008 10:57:22   

Using a Source control like Source Safe can help you out here. As far as I remember you can link files in different places together to be treated as one file. Any change at any physical place would be reflected in the other places.

Posts: 1268
Joined: 10-Mar-2006
# Posted on: 28-Mar-2008 16:08:54   

I do use source safe and yes, you can 'share' code between branches. Just wondering if that is what everyone is doing.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 07-Apr-2008 05:19:57   

If you need a fully-connected entity DAL, then a whole DAL project would resolve that. I you have independent projects and dependents each other at the same time so go on some "Source control" software to manage the changes. If you have some project (A) that depends on another (B), and you don't need to make changes on B's entities referenced by A, then only add the DLL.

As all things in the development world, this depend as well upon the scenario/project circumstances.

David Elizondo | LLBLGen Support Team
tangent
User
Posts: 41
Joined: 30-Apr-2006
# Posted on: 07-Apr-2008 08:37:38   

I highly recommend to consolidate all into one project. I have learned the hard way and seen enough others make the same mistake that I can pretty much guarantee you will regret it sooner or later if you attempt to maintain multiple projects.

If you have a really slow machine and are concerned about build times, you can do this:

Load the DAL project into VS and build it, then right click on the DAL project and select 'unload project'.

Now have all of your other projects reference the DAL .dll from its build location, any time you need to change something in the DAL or regenerate it you can just right click on its project file and tell it to reload and then rebuild it.

You could also just go into the solution build settings and tell the DAL project to never build upon rebuild. However I find that the unloading method makes it more clear when the project is and isn't being built, and it also keeps you from accidentally referencing the DAL by project instead of through the dll file. wink