コード例 #1
0
        public List <PurchasedProductInfo> GetClientPurchasedProducts(ClientInfoRequest clientInfoRequest)
        {
            var url = $@"http://localhost:51790/api/order/?{clientInfoRequest.ClientId}";

            using (HttpClient client = new HttpClient())
            {
                var jsonResult      = client.GetStringAsync(url).GetAwaiter().GetResult();
                var clientOrderList = JsonConvert.DeserializeObject <List <OrderModel> >(jsonResult);

                var purchasedProductInfoList = ClientUtil.GetPurchasedProductInfoListBasingAtClientOrderList(clientOrderList);
                return(purchasedProductInfoList);
            }
        }