예제 #1
0
        public IActionResult Address(AddressInputModel address)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }
            var userId = _signInManager.IsSignedIn(User) ? int.Parse(User.FindFirst("CustomerId").Value) : 10;
            var order  = _orderService.GetActiveOrder(userId);

            order             = _orderService.AddAddressesToOrder(address, order);
            TempData["order"] = JsonConvert.SerializeObject(order);
            return(RedirectToAction("ReviewPage"));
        }