//ccv ini public ActionResult Delete(int id) { var serviceCliente = new eCommerceService.IeCommerceServiceClient(); var productos = serviceCliente.GetProductos(new Service.DataContracts.GetProductosRequest()).Productos; if (serviceCliente.State == System.ServiceModel.CommunicationState.Opened) { serviceCliente.Close(); } return View(productos); }
public ActionResult Delete(Producto producto) { var serviceCliente = new eCommerceService.IeCommerceServiceClient(); serviceCliente.DeleteProducto(new Service.DataContracts.DeleteProductoRequest() { Producto = producto }); if (serviceCliente.State == System.ServiceModel.CommunicationState.Opened) { serviceCliente.Close(); } return RedirectToAction("Index"); }