示例#1
0
 public ActionResult SaveImage(AddImageProductCommand command)
 {
     try
     {
         var product = _mediator.Send(command);
         return RedirectToAction("Show", "Product", new { id = command.ProductId });
     }
     catch (Exception)
     {
         return View("AddImage", command);
     }
 }
示例#2
0
 public ActionResult SaveImage(AddImageProductCommand command)
 {
     try
     {
         var product = _mediator.Send(command);
         return(RedirectToAction("Show", "Product", new { id = command.ProductId }));
     }
     catch (Exception)
     {
         return(View("AddImage", command));
     }
 }