public async Task <OrderData> GetOrderDraftAsync(BasketData basketData) { _logger.LogDebug(" grpc client created, basketData={@basketData}", basketData); var command = MapToOrderDraftCommand(basketData); var response = await _orderingGrpcClient.CreateOrderDraftFromBasketDataAsync(command); _logger.LogDebug(" grpc response: {@response}", response); return(MapToResponse(response, basketData)); }
public async Task <OrderData> GetOrderDraftAsync(BasketData basketData) { return(await GrpcCallerService.CallService(_urls.GrpcOrdering, async channel => { var client = new OrderingGrpc.OrderingGrpcClient(channel); _logger.LogDebug(" grpc client created, basketData={@basketData}", basketData); var command = MapToOrderDraftCommand(basketData); var response = await client.CreateOrderDraftFromBasketDataAsync(command); _logger.LogDebug(" grpc response: {@response}", response); return MapToResponse(response, basketData); })); }