开发者

Data Annotations Silverlight

I have a webservice that supplies data (Publisher Object) to a silverlight project.

I want to bind the Publisher to a dataform and have the dataform handle to validation.

I would like to achive this by using DataAnnotations.

M开发者_如何学运维y question is.. Can I or how do you amend the Publisher object (Generated by the webservice) to add the DataAnnotations

Thanks Sp


Markup whatever class that you bind to the DataForm.

If this is a WCF web service and you bind the DataContract class objects to your DataForm, you can add the data annotations to your DataContract class members which are already annotated with [DataMember](Publisher object in your case). If you use the DataContract classes only as DTOs then markup the richer class on the Silverlight side.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜