I have a database entity called Area. In my Create model I have the following code:
public Entities.Entities.Area Area { get; set; }
and then in my view I just have an input for each of the properties in Area.
@Html.TextBoxFor(x => x.Area.Name)
When I save the form the Area object is being passed back as null. But when I change the Area object name in my Create model and update the references in the view it then saves.
public Entities.Entities.Area AreaDetail { get; set; }
@Html.TextBoxFor(x => x.AreaDetail.Name)
Why does the binding fail when the Area object was simply named Area? Does it have something to do with the MVC Area? If so, how would that mess up the bindings?
