コード例 #1
0
        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"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        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));
        }
コード例 #4
0
        // 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));
        }
コード例 #5
0
ファイル: Reference.cs プロジェクト: pettijohn/ODataRelay
 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;
 }
コード例 #6
0
ファイル: Reference.cs プロジェクト: pettijohn/ODataRelay
 public void AddToProducts_Above_Average_Prices(Products_Above_Average_Price products_Above_Average_Price)
 {
     base.AddObject("Products_Above_Average_Prices", products_Above_Average_Price);
 }