Im sure the solution is blindingly obvious but any ideas on how i would do the following with value injecter?
Say you have the following model:
public class Foo{
public int BarId{get;set;}
public Bar Bar{get;set;}
}
public class Bar{
public int Id{get;set;}
[Required]
public string Description{get;set;}
}
and a view model that looks like this:
public class FooBarViewModel{
public int BarId{get;set;}
public bool EditMode{get;set;}
}
when i call InjectFrom<UnflatLoopValueInjection>()
on the Foo
object i only want the Foo.BarId
property populated, not the Foo.Bar.Id
property as well. I would like to if possible stop the Unflattening process from recursing through the whole object graph if an exact match to a property name is found at a shallower depth in the graph.
Ideally i would like to do this without resorting to explicitly ignoring properties and being able to do this by convention.