Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ExtraMural extraMural = db.ExtraMurals.Find(id);

            db.ExtraMurals.Remove(extraMural);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "MuralId,MuralName")] ExtraMural extraMural)
 {
     if (ModelState.IsValid)
     {
         db.Entry(extraMural).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(extraMural));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "MuralId,MuralName")] ExtraMural extraMural)
        {
            if (ModelState.IsValid)
            {
                db.ExtraMurals.Add(extraMural);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(extraMural));
        }
Beispiel #4
0
        // GET: ExtraMurals/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ExtraMural extraMural = db.ExtraMurals.Find(id);

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