public IActionResult ListarItens() { var carrinhoCompraVM = new CarrinhoCompraVM { CarrinhoCompraItens = _carrrinhoCompraService.GetItensDoCarrinho(), QuantidadeItens = _carrrinhoCompraService.GetCarrinhoCompraQuantidade(), Total = _carrrinhoCompraService.GetCarrinhoCompraTotal() }; return(View(carrinhoCompraVM)); }
public IViewComponentResult Invoke() { var IDCarrinho = _carrinho.CarrinhoCompraID; var produtos = _carrinhoCompra.GetCarrinhoCompraItens(IDCarrinho); var CarrinhoCompraVM = new CarrinhoCompraVM() { CarrinhoCompraID = IDCarrinho, CarrinhoCompraItens = produtos, Total = _carrinhoCompra.GetTotal(IDCarrinho) }; return(View(CarrinhoCompraVM)); }
public IViewComponentResult Invoke() { var carrinhoCompraVM = new CarrinhoCompraVM { CarrinhoCompraItens = _carrinhoCompraService.GetItensDoCarrinho(), QuantidadeItens = _carrinhoCompraService.GetCarrinhoCompraQuantidade(), Total = _carrinhoCompraService.GetCarrinhoCompraTotal() }; return(View(carrinhoCompraVM)); }
public IActionResult Index(string CarrinhoCompraID) { var carrinho = _carrinhoCompra.GetCarrinho(CarrinhoCompraID); if (carrinho != null) { CarrinhoCompraVM carrinhoVM = _mapper.Map <CarrinhoCompraVM>(carrinho); return(View(carrinhoVM)); } else { return(NotFound()); } }