Beispiel #1
0
        public ActionResult Create([Bind(Exclude = "Id")] PaymentMethodViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                viewModel.Heading = "Create";

                return(View("PaymentMethodForm", viewModel));
            }

            _paymentMethodService.AddPaymentMethod(viewModel);

            return(RedirectToAction("Index"));
        }