Where should I build partial claases?

Posts   
 
    
cmprogrock
User
Posts: 40
Joined: 16-Nov-2008
# Posted on: 16-Nov-2008 21:22:25   

Hi All, I have generated a LLBLGen project. It is in VS Called 'BizCore'. It have a class called 'CarEntity'

I now want to add some custom methods...but want to be able to ReGen the LLBLGen project.

Where/How should I add partial classes with new methods? (Example: 'Partial' Folder in 'BixCore'. new Project that Refrences BizCore? Etc)

Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 16-Nov-2008 21:56:53   

Are you using SelfServicing or Adapter templateset? General or two classes preset? Anyway, to use partial classes you just have to put it at the same assembly at namespace. Take a look at this.

David Elizondo | LLBLGen Support Team
cmprogrock
User
Posts: 40
Joined: 16-Nov-2008
# Posted on: 16-Nov-2008 23:24:06   

Hi Daelmo, 1) Self Service. Linq Present (SQL Server)

2) I get same namespace assembly. My question is how to set this up in Visual Studio.

Example: Current Solution= Project:'AcmeBizCore (LLBLGen Generated Project) Project:'AcmeWPFApplication (With Reference to AcmeBizCore)

Proposed Solution Layout= Project:'AcmeBizCore (LLBLGen Generated Project)

Project:'AcmeBizFULL (Reference to 'AcmeBizCore' - but with new partial classes - all in same namespace/assembly)

Project:'AcmeWPFApplication (With Reference to AcmeBizFULL)

Is that correct? Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 17-Nov-2008 05:29:17   

You have to put it on the same assembly where your generated classes reside (AcmeBizCore). In other words you have to add the partial class to the AcmeBizCore generated project.

David Elizondo | LLBLGen Support Team
cmprogrock
User
Posts: 40
Joined: 16-Nov-2008
# Posted on: 17-Nov-2008 22:37:31   

Ok- So a Folder named..say 'MyPartials' within the AcmeBizCore (LLBLGen genereated project )will not get deleted/overwritten during regen. I'll put my partials there & forget the whole idea of the 'wrapper' project (AcmeBizCoreFULL - Not Needed)

Correct?

Thanks

(I hate it when I make simple things so complex!)

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-Nov-2008 00:09:16   

cmprogrock wrote:

Ok- So a Folder named..say 'MyPartials' within the AcmeBizCore (LLBLGen genereated project )will not get deleted/overwritten during regen. I'll put my partials there & forget the whole idea of the 'wrapper' project (AcmeBizCoreFULL - Not Needed)

That's correct wink There's only one scenario when the files could be removed (not deleted) from the AcmeBizCore: When the property CleanUpVsNetProjects is set to true (read more here). Default is false, so if you didn't switch it, every file/folder added to that project will be kept. (I don't want to confuse you more, just to be sure you are aware of this)

cmprogrock wrote:

(I hate it when I make simple things so complex!)

hehe smile

David Elizondo | LLBLGen Support Team