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