Validation application block and Business Entities

Topics: General Discussion Forum, Service Factory Modeling Edition Forum
Apr 20, 2008 at 4:59 PM
Edited Apr 20, 2008 at 6:17 PM
Would it be better to use the VAB in my Business Entities rather than on the DataContracts? I may have my business objects used outside a web service so I see validation being duplicated or shared. I'm thinking that if my business entities were datacontracts as well as implementing the VAB I'd have less work to do. Is the reason for the separation between BE and DC mainly due to likelihood that the DC within a Web Service contains a subset of BE data i.e. you have finer control over which data is published?
Does anyone have an example of using the VAB that they could provide please?

Apr 21, 2008 at 1:21 PM
Perhaps you could separate different scenarios for validation. In your DC you may validate data boundary (ranges, values, etc) specific rules that may be related to input data validation and add validation rules in your BEs that may be more focused on the internals of your business operation.

Just my 2 cents.