This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Now i can add custom attributes to any entity property, except Id property. |
|
|
You can't add custom attributes to the Id property because this is defined by the Entity<T> class in the LightSpeed assembly, not by your class. You would need to use something like TypeConverter or a metadata class instead -- let us know your scenario and we may be able to advise. |
|
|
I have UI attribute for automated creating user controls for entities displaying . I need display Id field for the user. You can make Id property virtual in Entity class and set attributes for overrided version in Entity class descendant.
|
|
|
We can't make Id virtual because that would allow derived classes to override its behaviour. If you really want to display the Id -- and remember the Id is an opaque internal value with no business meaning -- then I'd suggest you add a custom property that just surfaces the Id, e.g. public object EntityId { Then you can apply attributes to that custom property. |
|