views:

74

answers:

1

Hi,

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.

My question is.. Can I or how do you amend the Publisher object (Generated by the webservice) to add the DataAnnotations

Thanks Sp

A: 

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.

DaveB