Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[HttpGet]
public async Task<IActionResult> Get()
{
var rng = new Random();
var data = Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
})
.ToArray();
return Ok(new {
WeatherMan = (await _userService.GetUserAsync(this.User.Identity.Name)).FullName,
Data = data
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.