コード例 #1
0
        public ActionResult Create(ProductInput productInput)
        {
            ProcessResult results = _rulesEngine.Process(productInput);

            if (!results.Successful)
            {
                CopyValidationErrors(results);
                return View(productInput);
            }

            return RedirectToAction("Index");
        }
コード例 #2
0
 public ActionResult Index(ProductInput productInput)
 {
     IEnumerable<Product> products = _productRepository.GetAll();
     return View(products);
 }