well... simple is implement the logic just only one time instead repeat it everywhere... both NH and NHV give you the options to work with a fine grained model... if you don't want duplicate the validation-logic but continue having duplicated properties representing a range you can create a non-strongly-typed validator with 2 strings (properties names) parameter and use reflection to extract values and compare it.
My personal advise: you can have two public properties, just you have it now, which getter and setter works with the real IRange. In NH you can map the IRange, as component, and not map the others two "fake" properties. In this way the "refactoring" will involve only the Entity, its mapping and its validation-definition (and you will have DRY, fine-granied model, better design and better test-coverage). 2010/2/13 Bear <[email protected]> > Thanks for your quick response Fabio. > > I did read that post (in fact I've read it several times and many of > your other posts too) but I believe if I was to implement > IRange<DateTime>, I'd have to do *a lot* of re-factoring. > > To be honest, I'm trying to keep my project simple as possible. > > Is there no other way? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- Fabio Maulo -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
