Skip to content

Instantly share code, notes, and snippets.

@samueleresca
Created May 12, 2019 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueleresca/7b2f6284262d9be9b846f8af4885ae16 to your computer and use it in GitHub Desktop.
Save samueleresca/7b2f6284262d9be9b846f8af4885ae16 to your computer and use it in GitHub Desktop.
@functions {
WeatherForecast[] forecasts;
protected override async Task OnInitAsync()
{
forecasts = await Http.GetJsonAsync<WeatherForecast[]>("sample-data/weather.json");
}
class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF { get; set; }
public string Summary { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment