コード例 #1
0
        public async Task <IActionResult> EnderecoEntrega()
        {
            var carrinho = await _comprasBffService.ObterCarrinho();

            if (carrinho.Itens.Count == 0)
            {
                return(RedirectToAction("Index", "Carrinho"));
            }

            var endereco = await _clienteService.ObterEndereco();

            var pedido = _comprasBffService.MapearParaPedido(carrinho, endereco);

            return(View(pedido));
        }
コード例 #2
0
 public async Task <IActionResult> Index()
 {
     return(View(await _comprasBffService.ObterCarrinho()));
 }