Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Contextura contextura = db.Contexturas.Find(id);

            db.Contexturas.Remove(contextura);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,NombreContextura")] Contextura contextura)
 {
     if (ModelState.IsValid)
     {
         db.Entry(contextura).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(contextura));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "Id,NombreContextura")] Contextura contextura)
        {
            if (ModelState.IsValid)
            {
                db.Contexturas.Add(contextura);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(contextura));
        }
Пример #4
0
        // GET: Contexturas/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Contextura contextura = db.Contexturas.Find(id);

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