示例#1
0
        //
        // GET: /Home/
        public ActionResult Index()
        {
            var list = new TaskList
                {
                    Title = "My Task List",
                    Tasks = new List<TaskItem> {
                        new TaskItem {Title = "My First Task"},
                        new TaskItem {Title = "My Second Task"}
                    }
                };

            return View(list);
        }
示例#2
0
 public ActionResult Index(TaskList list)
 {
     // If you debug the application, the list should
     // show the tasks as modified in the knockout collection.
     return View(list);
 }