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