SharpModelBinder does not bind child entities #35

seif opened this Issue Jan 9, 2012 · 0 comments

1 participant

sharparchitecture member

There seems to be a problem in EntityValueBinder where when the view has

@Html.HiddenFor(m => m.Entity.ChildEntity.Id)

It does not bind the ChildEntity properly, but requires a change to

to become

var valueProviderResult = bindingContext.ValueProvider.GetValue(bindingContext.ModelName + ".Id");

Originally noticed problem when reported problem for SharpLite in this commit:

@seif seif added a commit that closed this issue Jan 14, 2012
@seif seif Closes #35
Not sure if the old code was providing any particular behaviour, so try the old method of getting the value first then try to get the value through Id property.

The "Id" is already hard coded around the coded.
@seif seif closed this in e6f7e39 Jan 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment