public ActionResult DeleteConfirmed(int id)
        {
            BowlSize bowlSize = db.Bowlsizes.Find(id);

            db.Bowlsizes.Remove(bowlSize);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Size")] BowlSize bowlSize)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bowlSize).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bowlSize));
 }
        public ActionResult Create([Bind(Include = "Id,Size")] BowlSize bowlSize)
        {
            if (ModelState.IsValid)
            {
                db.Bowlsizes.Add(bowlSize);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bowlSize));
        }
        // GET: BowlSizes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BowlSize bowlSize = db.Bowlsizes.Find(id);

            if (bowlSize == null)
            {
                return(HttpNotFound());
            }
            return(View(bowlSize));
        }
Exemplo n.º 5
0
 public Bowl(BowlSize size)
 {
     this.Size = size;
 }