public ActionResult Erase(int id)
        {
            PrensaPreForma prensaPreForma = db.PrensasPreForma.Find(id);

            db.PrensasPreForma.Remove(prensaPreForma);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Apelido,Descricao")] PrensaPreForma prensaPreForma)
 {
     if (ModelState.IsValid)
     {
         db.Entry(prensaPreForma).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(prensaPreForma));
 }
        public ActionResult Create([Bind(Include = "Id,Apelido,Descricao")] PrensaPreForma prensaPreForma)
        {
            if (ModelState.IsValid)
            {
                db.PrensasPreForma.Add(prensaPreForma);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(prensaPreForma));
        }
        // GET: PrensaPreFormas/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PrensaPreForma prensaPreForma = db.PrensasPreForma.Find(id);

            if (prensaPreForma == null)
            {
                return(HttpNotFound());
            }
            return(View(prensaPreForma));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            PrensaPreForma prensaPreForma = db.PrensasPreForma.Find(id);

            return(View("Erase", prensaPreForma));
        }