Added Custom Attributes

Posts   
 
    
MarcoP avatar
MarcoP
User
Posts: 270
Joined: 29-Sep-2004
# Posted on: 28-Dec-2006 18:48:37   

I need to add custom attributes to my generated entities and I was wondering if anyone can think of a good way of accomplishing this?

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 29-Dec-2006 02:30:49   

Can you expand a little bit on what exactly you want to do?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 29-Dec-2006 15:46:55   

You can use User Code regions inside the generated entity classes to insert your extra code. (eg. the "CustomEntityCode" user code region)

Or you can use the .NET 2.0 partial classes capability.

Please refer to the LLBLGen Pro docs: Using the generated code -> Adding your own code to the generated classes

MarcoP avatar
MarcoP
User
Posts: 270
Joined: 29-Sep-2004
# Posted on: 29-Dec-2006 16:56:00   

Walaa wrote:

You can use User Code regions inside the generated entity classes to insert your extra code. (eg. the "CustomEntityCode" user code region)

Or you can use the .NET 2.0 partial classes capability.

Please refer to the LLBLGen Pro docs: Using the generated code -> Adding your own code to the generated classes

Yes, I could do that, but now I'm forced to override all the properties I want to apply attributes to in the partial class. I actually found another way around this. I'm just going to use reflection to add my attributes.

Thanks though!