I'm having problems binding to an object while binding to a List of objects works. Using Mvc3.1 with Tools update.
When binding to the class Form, the HttpPost-function recieves the correct model. When binding to the FormViewModel, the HttpPost-function recieves an empty model.
Are there any restrictions when binding Models containing other models?
public class FormViewModel
{
public Form Form { get; set; }
}
public class Form
{
public List<Section> Sections { get; set; }
}
public class Section
{
public List<Question> Questions { get; set; }
}
public class Question
{
public int Id { get; set; }
public string Description { get; set; }
}