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

WCF DataService Metadata

3 Answers 106 Views
Web Services
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Timo
Top achievements
Rank 1
Timo asked on 28 Jun 2012, 07:29 AM
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!

3 Answers, 1 is accepted

Sort by
0
Viktor Zhivkov
Telerik team
answered on 02 Jul 2012, 01:34 PM
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.
0
Timo
Top achievements
Rank 1
answered on 02 Jul 2012, 02:31 PM
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.
0
Viktor Zhivkov
Telerik team
answered on 05 Jul 2012, 11:58 AM
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.
Tags
Web Services
Asked by
Timo
Top achievements
Rank 1
Answers by
Viktor Zhivkov
Telerik team
Timo
Top achievements
Rank 1
Share this question
or