I'm trying to learn ASP.NET MVC 3 coming from a web forms background. I'm trying to work out what would be the MVC way of implementing what I want, and the actual difficultly is that I am not sure what to google!
What I can't get my head around is how to work with more complex models. All the tutorials on the asp.net site work around fairly simple data objects, and consequently rather simple editors to manage the data with them.
Imagine a model for a hypothetical Party booking application:-
public class Party
{
public string PartyName {get;set;}
public DateTime PartyDate {get; set; }
public ICollection<Guest> Guests {get; set;}
}
public class Guest
{
public string Name {get; set;}
public string EmailAddress {get; set;}
}
The key here is the collection of guests.
What I want to understand how to achieve, is how to implement a controller+view which would allow me to create a Party and also add new Guests at the same time, in a single page (and preferably with the guest add/remove functionality in-page in ajax).
In a similar app in asp.net web forms, it would be straight forward to put the functionality for the guests in an UpdatePanel. But I am not sure how to go about implementing this in MVC.
If anyone has any tips, pointers, or links to articles that discuss similar topics, i'd be very greatful,
Thanks
slip