Data Rules

This library owes a lot to the work of Paul Stovell, and most of the concepts discussed here can be found in this article of his.

Data Rules is a validation framework. The goal here is to handle invalid data in your custom types a bit like DataSet does : instead of throwing an exception every time invalid data is affected to it, it records whether the data it is containing is valid or not ; and if not, why. This allows for much smoother UI integration (that is what ErrorProvider and IDataErrorInfo are all about).

The library predefines a set of useful rules (like NotNullRule, StringLengthRule, RegexRule...). These rules can also be specified as attributes. And there even is an adapter that allows the Enterprise Library Validation Application Block rules to be used.

Data Rules is used by Data Access to add validation capability to our business objects. It is also used by Data Activities to enforce business rules in our data flow.

Last edited Oct 22, 2009 at 9:16 AM by cartoixa, version 2


No comments yet.