public ActionResult DeleteConfirmed(string id) { Products_Above_Average_Price products_Above_Average_Price = db.Products_Above_Average_Price.Find(id); db.Products_Above_Average_Price.Remove(products_Above_Average_Price); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ProductName,UnitPrice")] Products_Above_Average_Price products_Above_Average_Price) { if (ModelState.IsValid) { db.Entry(products_Above_Average_Price).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(products_Above_Average_Price)); }
public ActionResult Create([Bind(Include = "ProductName,UnitPrice")] Products_Above_Average_Price products_Above_Average_Price) { if (ModelState.IsValid) { db.Products_Above_Average_Price.Add(products_Above_Average_Price); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(products_Above_Average_Price)); }
// GET: Products_Above_Average_Price/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Products_Above_Average_Price products_Above_Average_Price = db.Products_Above_Average_Price.Find(id); if (products_Above_Average_Price == null) { return(HttpNotFound()); } return(View(products_Above_Average_Price)); }
public static Products_Above_Average_Price CreateProducts_Above_Average_Price(string productName) { Products_Above_Average_Price products_Above_Average_Price = new Products_Above_Average_Price(); products_Above_Average_Price.ProductName = productName; return products_Above_Average_Price; }
public void AddToProducts_Above_Average_Prices(Products_Above_Average_Price products_Above_Average_Price) { base.AddObject("Products_Above_Average_Prices", products_Above_Average_Price); }