I\'m using RC1 of ASP.NET MVC.
I\'m trying to extend Phil Haack\'s model binding example. I\'m trying to use the default model binder to bind the following object:
To answer my own question:
I'm a dummy!
My example doesn't work because the Items property of the ListOfProducts class is not public:
public class ListOfProducts
{
public int Id { get; set; }
public string Title{ get; set; }
List<Product> Items { get; set; }
}
I changed:
List<Product> Items { get; set; }
to:
public List<Product> Items { get; set; }
and my code then worked.
To conclude the default model binder does work with types that contain properties of type List.
Starting with RC 1:
Your numbering looks OK.
Also, I noticed that you used different casing on your items property name. That should not make a difference, but it's worth checking.