Builder and boolean values

Mar 29, 2011 at 8:38 PM

Hi, 

Thank you for this great project, I am using it for a current project and learning a lot from it. I ran into a problem when using boolean values in an entity. The InputEntity is correct, but when the BuildEntity method in builder.cs is executed, the boolean values are not injected correctly into the entity.  

entity.InjectFrom(input)              
.InjectFrom<NullIntToEntity>(input)              
.InjectFrom<IntsToEntities>(input) 

I tried to create a BoolsToEntities class that subclasses from LoopValueInjection, but I can't get it to work, because I don't understand how it works. Can anyone point me in the right direction?

Cheers,

Jeroen. 

Mar 29, 2011 at 8:54 PM

hi,

if you have a property of type bool on both sides (entity and input) with same name than it should work, if you can't get it work

please ask this on stackoverflow.com, and tag it with valueinjecter (as said on the http://valueinjecter.codeplex.com), and post there your entity and your viewmodel

this is related to valueinjecter, and on stackoverflow it's much easier to post/format code

Mar 29, 2011 at 9:23 PM

Hi,

Thanks. The problem was a bool in the entity and a bool? in the inputmodel, fixed now ;). My bad.

Cheers,

Jeroen.