public async Task <IEnumerable <WeatherForecast> > GetAsync() { return(await Task.Run(() => { // Simulate an optimized 20ms latency Task.Delay(TimeSpan.FromMilliseconds(20)); return WeatherForecastFixture.GetFiveDayForecastAsync(); })); }
public IEnumerable <WeatherForecast> Get() { // Simulate an optimized 20ms latency Thread.Sleep(TimeSpan.FromMilliseconds(20)); return(WeatherForecastFixture.GetFiveDayForecast()); }