public virtual ActionResult Add(TblProduct model)
 {
     if (!ModelState.IsValid)
     {
         ViewBag.TblCategories = new SelectList(db.TblCategories.ToList(), "TblCategoriesID", "Name");
         return View(model);
     }
     db.TblProduct.Add(model);
     db.SaveChanges();
     return RedirectToAction(MVC.Image.ActionNames.Add, MVC.Image.Name, new { tableName = "Product", id = model.TblProductID });
 }
 public virtual ActionResult Edit(TblProduct model)
 {
     if (!ModelState.IsValid)
     {
         ViewBag.TblCategories = new SelectList(db.TblCategories.ToList(), "TblCategoriesID", "Name");
         return View(model);
     }
     db.TblProduct.Attach(model);
     db.Entry(model).State = System.Data.Entity.EntityState.Modified;
     db.SaveChanges();
     return RedirectToAction(MVC.Image.ActionNames.Add, MVC.Image.Name, new { tableName = "Product", id = model.TblProductID });
 }