public async Task <IActionResult> Edit(int id, Producto producto, List <IFormFile> Imagen1, List <IFormFile> Imagen2, List <IFormFile> Imagen3) { if (id != producto.Id) { return(NotFound()); } if (ModelState.IsValid) { try { var imgBlob1 = await _imagenesProductosService.AgregarImagenesBlob(Imagen1); var imgBlob2 = await _imagenesProductosService.AgregarImagenesBlob(Imagen2); var imgBlob3 = await _imagenesProductosService.AgregarImagenesBlob(Imagen3); ImagenesProducto imagenesEdit = new ImagenesProducto() { Imagen1 = imgBlob1, Imagen2 = imgBlob2, Imagen3 = imgBlob3, ProductoId = id }; await _imagenesProductosService.EditImagenes(imagenesEdit); await _productosService.EditProductoPost(producto); } catch (DbUpdateConcurrencyException) { if (!ProductoExists(producto.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Modificado", "Vendedores")); } _memoryCache.Remove("ProductosForIndex2"); return(View(producto)); }