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

Extending Generated Entities

4 Answers 108 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 21 Apr 2011, 04:15 PM
I have created a domain model using OpenAccess and it has generated the appropriate files. I want to add behaviour to my entities so I have generated a partial class for this. I am using WCF RIA Services but when I inspect the generated code for the client side of the RIA Services my methods implemented in the new partial class don't exist. What am I doing wrong?

4 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 21 Apr 2011, 07:14 PM
Replying to my own thread as I could not find a way to remove it now that I seem to have found the answer.

After some research (Google) it appears that the Partial class file must be renamed *.shared.cs to enable the partial class to be used client-side.

If this is incorrect or I'm missing something please let me know.
0
Accepted
Zoran
Telerik team
answered on 22 Apr 2011, 01:09 PM
Hello David,

 Absolutely, this is the way to add custom code in order to extend classes that are to be used with WCF RIA services . If you have any additional issues/questions, please do not hesitate to contact us back.

Kind regards,
Zoran
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ubuntu
Top achievements
Rank 1
answered on 23 Apr 2011, 01:46 PM
Hello David,

I believe you are talking about adding Validations for the generated classes, right ?
Because I can extend the generated classes by OA and add my custom logic then use them easily from the client side ..!!

Can you please confirm this ...

Regards
0
David
Top achievements
Rank 1
answered on 09 May 2011, 09:12 AM
The answer from Telerik Admin was the confirmation I was after. Thanks to all.
Tags
Getting Started
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Zoran
Telerik team
Ubuntu
Top achievements
Rank 1
Share this question
or