public ActionResult AddProductToDB(ProductViewModel _product) { IProductRepository ProdRepo = new ProductRepository(); int x = ProdRepo.SaveNewProduct(_product.ConvertToProduct()); return(RedirectToAction("ManageProducts")); }
public ActionResult EditProduct(ProductViewModel _product) { IProductRepository ProdRepo = new ProductRepository(); ProdRepo.EditProduct(_product.ConvertToProduct()); return(RedirectToAction("ManageProducts")); }