public ActionResult Delete(LineaPedidoViewModel linea) { try { LineaPedidoCEN cop = new LineaPedidoCEN(); cop.Destroy(linea.id); return(RedirectToAction("Index")); } catch { return(View()); } }
// GET: LineaPedido/Delete/5 public ActionResult Delete(int id) { try { LineaPedidoCEN cen = new LineaPedidoCEN(); cen.Destroy(id); // TODO: Add delete logic here return(RedirectToAction("Index")); } catch { return(View()); } }