Open VinhTue opened 5 years ago
Same issue. Resolved by adding FromForm to the property to use default model binding,
public ActionResult AdminAdd(CompanyDetailViewModel model)
public class CompanyDetailViewModel : CompanyViewModel
{
public InviteEditModel Admin { get; set; }
}
Form data posted Id: 1 Admin.Email: jim@jim.com Admin.FirstName: 1 Admin.LastName: 2
Admin model is null.
Workaround: public ActionResult AdminAdd([FromForm]CompanyDetailViewModel model)
Same for me.
Items are always null