I have an asp.net mvc application that uses web service. I have various controllers that use the model provided by the web service. The problem is that client and server-side validation cannot be used as the class is not defined in my web application. How should I go about adding validation to this class?
Eg:
SomeController {
someMethod(Service.User u) {
if (ModelState.isValid) { // always valid as no annotations
Create a View Model and use that:
Then map it back to the
Service.Userin the controller: