public IActionResult OnPost([FromServices] AddCustomerInformation addCustomerInformation)
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }
            addCustomerInformation.Do(CustomerInformation);

            return(RedirectToPage("/Checkout/Payment"));
        }
示例#2
0
        public IActionResult AddCustomerInformation(
            AddCustomerInformation.Request customerInformation,
            [FromServices] AddCustomerInformation addCustomerInformation)
        {
            if (ModelState.IsValid)
            {
                addCustomerInformation.Do(customerInformation);
                return(Ok());
            }

            return(BadRequest());
        }