I have a list of business objects (1000+) with 50 or so properties they have around 70 different validations that need to be performed. It seems like the way to go is to use a validation rule, but I really like IDataErrorInfo
. Is it a waste of memory to have IDataErrorInfo
defined for every object while they use the same validation all along?
PS: I didn't post the code because it enormous and tedious to look at.
IDataErrorInfo
just contains a pair of properties.
It has no per-instance overhead.
It's up to you to make an implementation that peforms well; the shouldn't be too hard.