ReaderInjection doubts

Feb 18, 2013 at 3:58 PM
Hi this is my first time of using valueinjector. May be this question was asked before but unfortunately I couldn't find it anywhere.
I am trying to use valueinjector in my generic data access module. From samples, I can see that, I can use ReaderInjection for my DTO entity. But few of my DTO entity has enums defined in it while db tables have corresponding int or string value. So whats the best way to achieve following nested injections?


I tried calling them in chain fashion but looks like, I keep getting error on ReaderInjection it self when it try to convert string to enum value. Since it does not know how to convert string to enum. I can add conditions inside ReaderInjection to skip for enums but don't want keep adding if-else block for different logic.

Do I have to use CloneInjector for this scenario? Or shall I use Mapper inside ReaderInjection?
Do you have any suggestion how should I solve this issue?

Feb 18, 2013 at 4:02 PM
the best thing to do would be to modify the ReaderInjection to suit your needs, add if else conditions for your enums and whatever else you'll have in the future