I am reading several verification documents at ASP.NET MVC. Ignoring those that suggest inventing a wheel that spells its own validation logic, most articles advocate the use xValor Validation Validator Validator, which allows declarative validation by decorating model properties (*).
I think I will go for xValit as it seems most recommended (and thus, I hope, is supported). What puzzles me is what I use Linq to SQL, and my models are declared in an automatically generated ( dbml+ partial.cs) file containing several classes and almost 5000 lines, so I don’t really want to edit it, as if I changed the db structure, I would have to regenerate it, losing my changes.
Is there any way to avoid editing this file?
(*) I also found the Validator Toolkit , which also provides declarative validation and does not request decoration of model properties, but the page shows 57 downloads, so I can’t say if the project is mature or not.
source
share