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