public ActionResult Delete(string id, FormCollection collection) { try { productos.borrarProducto(id); return(RedirectToAction("Index")); } catch { return(View()); } }
public async Task <ActionResult> Delete(string id, IFormCollection collection) { try { // TODO: Add delete logic here await productos.borrarProducto(id); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }