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