FactoryClasses being overriden (with code regions defined)

Posts   
 
    
Kovan
User
Posts: 19
Joined: 26-Sep-2005
# Posted on: 26-Sep-2005 18:50:23   

We have extended the factoryclasses (added a soundEx) the FactoryClasses.cs is always being overriden, we wanna be able to maintain a section of code that we added manually, any help would be appreciated

i have tried this // C# // __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces using System.Data; // __LLBLGENPRO_USER_CODE_REGION_END

but on regeneration, this section no longer exists, however, in the entity classes (derived from base class) in a two class scenerio, the code is maintained.

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 27-Sep-2005 04:53:05   

Kovan wrote:

We have extended the factoryclasses (added a soundEx) the FactoryClasses.cs is always being overriden, we wanna be able to maintain a section of code that we added manually

What version of LLBLGen are you using?

Which method did you use to extend your factory classes:

  • Modifying the templates
  • Add code to the generated class

It's probably stating the obvious, but code added to a generated class must be inside the

// __LLBLGENPRO_USER_CODE_REGION_START // __LLBLGENPRO_USER_CODE_REGION_END

block to be retained.