コード例 #1
0
        /// <inheritdoc/>
        public async Task <Stockist> GetStockistByCodeAsync(string stockistCode)
        {
            var request = new GetStockistRequest {
                StockistCode = stockistCode
            };
            var response = await this.stockistsClient.GetStockistAsync(request);

            return(this.mapper.Map <Stockist>(response.Stockist));
        }
コード例 #2
0
        /// <inheritdoc />
        public override async Task <GetStockistResponse> GetStockist(GetStockistRequest request, ServerCallContext context)
        {
            var stockist = await this.stockistService.GetStockistByCodeAsync(request.StockistCode);

            return(new GetStockistResponse
            {
                Stockist = this.mapper.Map <Stockist>(stockist),
            });
        }