public async Task <ActionResult> DeleteConfirmed(int id) { tipo_evento tipo_evento = await db.tipo_evento.FindAsync(id); db.tipo_evento.Remove(tipo_evento); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "id,tipo_evento1")] tipo_evento tipo_evento) { if (ModelState.IsValid) { db.Entry(tipo_evento).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(tipo_evento)); }
public async Task <ActionResult> Create([Bind(Include = "id,tipo_evento1")] tipo_evento tipo_evento) { if (ModelState.IsValid) { db.tipo_evento.Add(tipo_evento); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(tipo_evento)); }
// GET: tipo_evento/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tipo_evento tipo_evento = await db.tipo_evento.FindAsync(id); if (tipo_evento == null) { return(HttpNotFound()); } return(View(tipo_evento)); }