public ActionResult DeleteConfirmed(int id) { tipo_de_software tipo_de_software = db.tipo_de_software.Find(id); db.tipo_de_software.Remove(tipo_de_software); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "idtipo_de_software,categoria")] tipo_de_software tipo_de_software) { if (ModelState.IsValid) { db.Entry(tipo_de_software).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tipo_de_software)); }
public ActionResult Create([Bind(Include = "idtipo_de_software,categoria")] tipo_de_software tipo_de_software) { if (ModelState.IsValid) { db.tipo_de_software.Add(tipo_de_software); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tipo_de_software)); }
// GET: tipo_de_software/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tipo_de_software tipo_de_software = db.tipo_de_software.Find(id); if (tipo_de_software == null) { return(HttpNotFound()); } return(View(tipo_de_software)); }