This is a migrated thread and some comments may be shown as answers.

[Solved] Attributes on Partial Class Fields

2 Answers 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
sitefinitysteve asked on 04 Feb 2011, 07:11 PM
I have a field (ParentID) that I can't map with the model (shared master problem)....

So what's the best practice for my partial class if I define the linkage in there...?  Is there an attribute I need to apply to the custom properties?

2 Answers, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 09 Feb 2011, 06:26 PM
Hi Steve,

 Can you give us more information on the approach you are trying to implement in this scenario? If I understand you correctly you would like to delete your property from the designer and then hand-code it in a partial class. If that is true, than this property will be threated as transient if you use XML mapping. In this case you do not need to apply any attributes. If you use attributes mapping that it is possible that you might have the need of some attributes, like the TransientAttribute. Can you explain what is your end goal in the partial class? Would you like to have a Parent reference property that is calculated based on the ParrentId?

Looking forward to get more info on this case and find the best approach for resolving it.

Kind regards,
Zoran
the Telerik team
Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
0
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 09 Feb 2011, 06:36 PM
Yeah, using XML mapping...

Ok, so I'm good then eh :)  It's just to get around this issue until you guys can find a solution
Tags
General Discussions
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Zoran
Telerik team
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or