public ViewResult CarsSync() { SampleAPIClient client = new SampleAPIClient(); var cars = client.GetCarsAsync().Result; return View("Index", model: cars); }
public async Task<ViewResult> CarsAsync() { SampleAPIClient client = new SampleAPIClient(); var cars = await client.GetCarsAsync(); return View("Index", model: cars); }