using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using GridInForm.Models;

namespace GridInForm.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View(new Category
                {
                    Name = "Category 1",
                    Products = new List<Product> {
                        new Product
                        {
                            Name = "Product 1",
                            CategoryID = 1
                        }
                    }
                });
        }

        public ActionResult Save(Category category)
        {
            return View(category);
        }
    }
}
