how to make the generated code generate interfaces for the properties & custom properties

Posts   
 
    
vairam2008
User
Posts: 86
Joined: 11-Mar-2008
# Posted on: 30-Mar-2008 22:11:09   

how to make the generated code generate interfaces for the properties & custom properties. I am trying to generate interfaces for all my entities by default & start adding new methods & properties.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 31-Mar-2008 03:27:35   

You can create new templates so you put there your new code (partial classes, inherited classes, etc.) or modify (carefully) the existing templates. You should start by reading some key concepts and guidelines at the SDK Documentation (Template Sets, for example).

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 01-Apr-2008 10:02:45   

you can define which interfaces to implement on each entity in the designer (with macro's and a plugin). You then can write a template which generates the implementation of these interfaces (if required) into a partial class.

In general though, interfaces aren't really needed in this scenario: interfaces are only implemented by one class in this case and the class isn't generic so the interface is more or less a redefinition of the entity type.

Frans Bouma | Lead developer LLBLGen Pro
vairam2008
User
Posts: 86
Joined: 11-Mar-2008
# Posted on: 01-Apr-2008 19:15:12   

you can define which interfaces to implement on each entity in the designer (with macro's and a plugin). You then can write a template which generates the implementation of these interfaces (if required) into a partial class.

What do you mean by macro's & plugin?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 01-Apr-2008 19:24:56   

vairam2008 wrote:

you can define which interfaces to implement on each entity in the designer (with macro's and a plugin). You then can write a template which generates the implementation of these interfaces (if required) into a partial class.

What do you mean by macro's & plugin?

The plugin which allows you to specify additional interfaces on entities (see manual wink ) without doing that one by one. Right click 'Entities' in project explorer -> Run plugin -> Add / Remove additional interface / namespace ... Dialog pops up -> second tab, you can specify what you want. With macro's (See description in manual Using the designer -> Adding and editing entities -> Viewing entity information -> output specific settings.

All our plugins come with full sourcecode in the SDK so you can alter them if you want to.

Frans Bouma | Lead developer LLBLGen Pro