Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Naming of subclasses
 

Pages: 1
LLBLGen Pro Runtime Framework
Naming of subclasses
Page:1/1 

  Print all messages in this thread  
Poster Message
JimFoye
User



Location:
Austin, TX
Joined on:
22-Jun-2004 04:03:11
Posted:
656 posts
# Posted on: 01-Sep-2006 01:37:03.  
Is there any way to control the naming of subclasses? I'm using 2.0 and the adapter TwoClasses preset. It's kind of funny, because I can control the names of the files for each class, but not the class name itself. So it's easy to put my derived Person class in "PersonWhatever.cs", but the class name remains "MyPersonEntity". Looking at derivedEntityAdapter.template, it seems to me this is hardcoded.

I want to change it for a couple of reasons. One is aesthetic, the "My" prefix just seems kind of VB-ish. Also, I have a bunch of code that I was previously putting into a template, and I would prefer to put that code in subclassed entities now, and converting all my existing code that uses those entities will be easier if the derived class is, for example, "PersonEntity" (in which case I'll need to make the base class something different, like "PersonEntityBase"). To me, this would make it more clear that "PersonEntityBase" is 100% generated code, and "PersonEntity" contains additional code and is the entity that should be used.



  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14627 posts
# Posted on: 01-Sep-2006 08:32:40.  
Please follow the steps mentioned in the following thread to have your custom template set instead of modifying the original template set
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=6880


  Top
JimFoye
User



Location:
Austin, TX
Joined on:
22-Jun-2004 04:03:11
Posted:
656 posts
# Posted on: 01-Sep-2006 15:41:02.  
Ah, thanks, I had missed that thread!
  Top
KPx
User



Location:
Canada
Joined on:
18-Sep-2007 16:02:01
Posted:
4 posts
# Posted on: 18-Sep-2007 21:59:30.  
Hi JimFoye,

Were you successful in creating a custom template for the two classes approach? I have the same interest you mention in this thread, but I am having trouble modifying the templates to work correctly.

I'm trying to achieve the two class, .net 2.0 adapter template, where OrderEntityBase is the generated base class, and OrderEntity is the sub class that inherits from the base. It is the class where my custom code resides.

I'm in the same situation where I've already coded an application, and want to move my custom code to a separate class for clarity, and I don't want to refactor the application to rename all the entities to MyOrderEntity, etc.

It would be great if you could share the template files if you were able to figure it out, or even a sample/instructions to help a fellow LLBLGen user! Regular Smiley

Thanks,

KP


  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14627 posts
# Posted on: 19-Sep-2007 14:09:18.  
Which version of LLBLGen Pro are you using?
  Top
KPx
User



Location:
Canada
Joined on:
18-Sep-2007 16:02:01
Posted:
4 posts
# Posted on: 20-Sep-2007 03:37:43.  
Walaa wrote:
Which version of LLBLGen Pro are you using?

Hi Walaa, I'm using v2.0 of LLBLGen Pro.


  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14627 posts
# Posted on: 21-Sep-2007 20:11:39.  
Have you tried the steps in the following thread?
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=6880
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.