public ActionResult Index() { PopulateWidgets(); var catalog = new Catalog { Widgets = widgets }; return View(catalog); }
public ActionResult Index(string description) { if (widgets == null) widgets = new List<Widget>(); widgets.Add(new Widget { Id = new Guid(), Description = description }); var catalog = new Catalog { Widgets = widgets }; return View(catalog); }