Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Architecture> Extend generated entities to add custom attriubtes to properties
 

Pages: 1
Architecture
Extend generated entities to add custom attriubtes to properties
Page:1/1 

  Print all messages in this thread  
Poster Message
AidanC
User



Location:

Joined on:
01-Dec-2008 05:08:36
Posted:
1 posts
# Posted on: 01-Dec-2008 05:18:05.  
Hi

I want to use LLBLGENPRO in conjunctionwith Microsofts Enterprise Library 4.1 Validation framework.
The feature I want to use from the validation framework is the ability to specify validation rules as attributes of public properties on the generated business entities.

public class MyLLBLGENProGeneratedBusinessEntity
{

[StringLengthValidator(1, 50, Ruleset="RuleSetA",
             MessageTemplate="First Name must be between 1 and 50 characters")]
        public virtual System.String Name
        {
            get { return (System.String)GetValue((int)MyLLBLGENProGeneratedBusinessEntityFieldIndex.Name, true); }
            set    { SetValue((int)MyLLBLGENProGeneratedBusinessEntityFieldIndex.Name, value); }
        }


How can I add custom attributes to properties of my generated business entities so that they will remain there even after re-generation?

Thanks

Aidan
Aidan  Top
wtijsma
User



Location:
Amsterdam
Joined on:
18-Apr-2006 15:46:26
Posted:
252 posts
# Posted on: 02-Dec-2008 14:30:08.  
Hi Aidan,

I remember this has been discussed before, see this thread:
http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=11384

Best Regards,

Wiebe


Wiebe Tijsma
http://www.netindustry.nl | http://www.twitter.com/wtijsma
 
Top
Pages: 1  


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

Version: 2.1.12172008 Final.