Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Data Validation with WCF datacontract RSS

2 replies

Last post Aug 02, 2009 02:52 AM by xsdf

(0)
  • xsdf

    xsdf

    Member

    177 Points

    255 Posts

    Data Validation with WCF datacontract

    Jul 27, 2009 01:15 PM | LINK

    I had take a look at sample code of how to do data validation in silverlight .

    But My data is not simple class with some properties ,it was defined in wcf and generated automatically .

     I can't do same thing (to throw exception in set method of property ) ,

    does anyone know how to do data validation with those auto generated object ? 

    Or do something in wcf to make it possible to have the same effect of validation UI . 

    Thanks ....

     

    ************************************
    To be or not to be, it's not a question ,it's life.
  • Mog Liang - MSFT

    Mog Liang -...

    All-Star

    21645 Points

    2132 Posts

    Microsoft

    Re: Data Validation with WCF datacontract

    Jul 31, 2009 08:39 AM | LINK

    Hi,

    One easy approach is to modify the auto-generated code. however, we need repeat modification after each service updating operation.

    Another approach is sharing Entities between WCF and silverlight, check this link

    http://dotnet.dzone.com/news/sharing-entities-between-wcf

    And using RIA service may also be helpful but little overkilled, it allows define validation rules on server-side entity. you can get hlep document at

    http://www.microsoft.com/downloads/details.aspx?FamilyID=76bb3a07-3846-4564-b0c3-27972bcaabce&displaylang=en

    Thanks,

    Mog Liang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • xsdf

    xsdf

    Member

    177 Points

    255 Posts

    Re: Data Validation with WCF datacontract

    Aug 02, 2009 02:52 AM | LINK

    Thanks ..

    I'd better look forward to the release version of RIA services . 

    ************************************
    To be or not to be, it's not a question ,it's life.