示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SturgeonBayStone sturgeonbaystone = db.SturgeonBayStones.Find(id);

            db.SturgeonBayStones.Remove(sturgeonbaystone);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "ID,SturgeonBayStone1")] SturgeonBayStone sturgeonbaystone)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sturgeonbaystone).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(sturgeonbaystone));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "ID,SturgeonBayStone1")] SturgeonBayStone sturgeonbaystone)
        {
            if (ModelState.IsValid)
            {
                db.SturgeonBayStones.Add(sturgeonbaystone);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(sturgeonbaystone));
        }
示例#4
0
        // GET: /SturgeonBayStone/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SturgeonBayStone sturgeonbaystone = db.SturgeonBayStones.Find(id);

            if (sturgeonbaystone == null)
            {
                return(HttpNotFound());
            }
            return(View(sturgeonbaystone));
        }