Example #1
0
        public async Task <IList <Product> > GetByIdAsync(IList <string> ids)
        {
            return(await _grpcCallerService.CallService(_productServiceProvider.GrpcEndpoint, async (grpcChannel) =>
            {
                var client = new ProductService.ProductServiceClient(grpcChannel);
                var response = await client.GetByIdsAsync(new GetByIdsRequest
                {
                    Ids = { ids }
                });

                return response.Products;
            }));
        }