WCF DataService Metadata

4 posts, 0 answers
  1. Timo
    Timo avatar
    5 posts
    Member since:
    Sep 2011

    Posted 28 Jun 2012 Link to this post

    Is there a possibility to mark a property as required (nullable=false) in the generated WCF DataService Metadata? I have it set to nullable=false in the Entity Model but without success.

    Thanks!
  2. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 02 Jul 2012 Link to this post

    Hello Timo,

    OpenAccess ORM supports the standard Data Annotation attributes found in System.ComponentModel.DataAnnotations assembly.
    You can mark the properties of your Entities or DTO types using KeyAttribute, RequiredAttribute and StringLenghtAttribute.
    You can see how this can be used in conjunction with our code generation or just see how to safely apply the attributes in this code library sample. For reference about attribute application see DataAnnotation.generated.cs/vb code file in the sample project.

    If you have any additional questions do not hesitate to share them with us.

    Regards,
    Viktor Zhivkov
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
  3. DevCraft banner
  4. Timo
    Timo avatar
    5 posts
    Member since:
    Sep 2011

    Posted 02 Jul 2012 Link to this post

    Hello Viktor,

    Thank you for the response. I have added a WCF DataService (OData v3) to the sample application using the Telerik OpenAccess Service Wizard. But the generated metadata (attached to this reply) do not include any attributes.
  5. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 05 Jul 2012 Link to this post

    Hello Timo,

    Indeed there is an issue with our Data Service Metadata Provider which needs to be resolved before we can include additional metadata for entity attributes. We will fix this problem for one of the upcoming releases of OpenAccess.

    Please find your Telerik points updated for reporting this.

    Kind regards,
    Viktor Zhivkov
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Back to Top