public SaveProduct ( ProductDto product ) : System.Web.Mvc.ActionResult | ||
product | ProductDto | |
return | System.Web.Mvc.ActionResult |
public ActionResult SaveProduct(ProductDto product)
{
var success = true;
var message = String.Empty;
try
{
ProductServices.WithDto(product).Get();
}
catch (Exception e)
{
success = false;
message = e.ToString();
}
return this.Direct(new { success, data = product, message });
}