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