validation logic on the client side (again) RRS feed

  • Question

  • I know this is one of the top ten wishes, but it is a major drag having to implement (and keep in sync) IDataErrorInfo in each object on the client side when I have already gone to great lengths to define it all using code first and DataAnnotations on the server side.  This seems like it should be a pretty simple thing to implement:

    a) extend odata to include the annotations in $metadata

    b) extend the code generator in VS to read that and generate the needed validation logic in the client side objects

    Any chance this might show up soon?  If not, I'm thinking I'm going to write a small program that looks at my DbContext and generates all the partial classes with validation logic for the client side as keeping it in sync by hand is a real headache when the schema is still changing frequently.

    Friday, August 12, 2011 6:45 PM


  • I see on the OData.org site that we are discussing adding something like this, under the banner of "vocabularies"--


    Of course, there is no indication from this post of whether this functionality will make it into the next release of OData (and when that will be) or whether the WCF Data Services client library will support it, but we seem to be pretty good at supporting new service functionality in the client.


    Please visit my blog

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, August 16, 2011 8:02 AM