Extending Generated Entities

5 posts, 1 answers
  1. David
    David avatar
    13 posts
    Member since:
    Aug 2012

    Posted 21 Apr 2011 Link to this post

    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?
  2. David
    David avatar
    13 posts
    Member since:
    Aug 2012

    Posted 21 Apr 2011 Link to this post

    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.
  3. DevCraft banner
  4. Answer
    Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 22 Apr 2011 Link to this post

    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
  5. Ubuntu
    Ubuntu avatar
    89 posts
    Member since:
    Jul 2012

    Posted 23 Apr 2011 Link to this post

    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
  6. David
    David avatar
    13 posts
    Member since:
    Aug 2012

    Posted 09 May 2011 Link to this post

    The answer from Telerik Admin was the confirmation I was after. Thanks to all.
Back to Top
DevCraft banner