title: How to get result value from WebAPI in Xamarin
body: <pre><code>public async Task&lt;Customer&gt; GetCustomersAsync(string id)
      {
          var prod = new Customer();
          HttpClient client = new HttpClient();
          string url = &quot;https://xxxxxx.com/api/Customers/&quot; + id;
          client.BaseAddress = new Uri(url);
          HttpResponseMessage response = await client.GetAsync(&quot;&quot;);
          if (response.IsSuccessStatusCode)
          {
              string content = response.Content.ReadAsStringAsync().Result;
              prod = JsonConvert.DeserializeObject&lt;Customer&gt;(content);
          }
          return await Task.FromResult(prod);
      }
  </code></pre>
  <ul>
  <li><p>Class Customer(Models)</p>
  <pre><code> public class Customer
   {
    public string CodeRandom { get; set; }
    public string NameUs { get; set; }
   }
  </code></pre>
  </li>
  </ul>
  <p>I do make a call to the API to get the results. However I can't get the return result when <code>.Result</code></p>
  <p>This is how I do it:</p>
  <pre><code>var infocustomer = customerRepository.GetCustomersAsync(userrating);
  string nameus = infocustomer.Result.NameUs;
  </code></pre>
  <ul>
  <li>When I debug, <code>nameus</code> exits by itself. Please give me any solution. Thank you</li>
  </ul>