Validating the Telerik OpenAccess ORM
persistent objects with the Validation Application Block
of the Enterprise Library
should be the same as validating any other object - you need the validation attributes or the self validating method in your domain classes.
We are using the same approach for our out of the box Data Annotation Attributes generation
- you could find an example of the usage of this validation in the AJAX With Data Annotations
example of our Samples Kit
. You could base your application on the example replacing the Data Annotation attributes
with the ones from the Validation Application Block
and the default editors with the Kendo UI ones. I suggest you take a look the Handling Server Side Validation with Kendo UI
blog post describing how to handle the validation errors returned from the server.
Regarding the internal server error - I suggest you use our Fiddler tool
which will show you the actual error message returned from the server.
If the scenario in the above-mentioned sample application is not applicable for you, could you please provide us with more information about the following details:
1) Are the Data Annotation attributes applicable for your scenario or you need the validation of the VAB from the Enterprise Library?
2) What kind of mapping are you using in your OpenAccess ORM model?
If you use our fluent (code only) mapping you can specify the attributes directly in your domain classes because the code is generated only one time. Otherwise you will need to specify the validation attributes in buddy classes or modify our code generation templates.
3) What kind of technologies are you using in your upper layers (e.g. ASP.Net MVC and Kendo UI extensions for MVC or ASP.Net Web API with Kendo UI Web)?
I am looking forward to your feedback.
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features
shipped with our latest release!