public ActionResult Delete(int id)
        {
            var repo = new ProductRepository();
            repo.DeleteProduct(id);

            return Json(new { id });
        }
 public ActionResult List()
 {
     var repo = new ProductRepository();
     return Json(repo.GetProducts(), JsonRequestBehavior.AllowGet);
 }
 public ActionResult Create(Product postData)
 {
     var repo = new ProductRepository();
     repo.AddProduct(postData);
     return Json(new { id = postData.Id });
 }