diff options
| author | Sjory <Mgj32000@gmail.com> | 2024-12-05 13:23:12 +0100 |
|---|---|---|
| committer | Sjory <Mgj32000@gmail.com> | 2024-12-05 13:23:12 +0100 |
| commit | dae84a9660ed572dc150e548eb71ac38a0efbf6e (patch) | |
| tree | 285a1321c9cc0a403122449d81970729522930b7 /DrinksMachineWebsite/Pages/FetchData.razor | |
| parent | ca3e50a78787685fb5a39c6f751a87b2beb65c17 (diff) | |
Updated to .Net v8.0
since there was almost no development made except a few test. i startet from scratch with .Net 8.0 and made a Blazor (Auot - Server/Web app)
Diffstat (limited to 'DrinksMachineWebsite/Pages/FetchData.razor')
| -rw-r--r-- | DrinksMachineWebsite/Pages/FetchData.razor | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/DrinksMachineWebsite/Pages/FetchData.razor b/DrinksMachineWebsite/Pages/FetchData.razor deleted file mode 100644 index 2aefd4a..0000000 --- a/DrinksMachineWebsite/Pages/FetchData.razor +++ /dev/null @@ -1,47 +0,0 @@ -@page "/fetchdata" -@using DrinksMachineWebsite.Data -@inject WeatherForecastService ForecastService - -<PageTitle>Weather forecast</PageTitle> - -<h1>Weather forecast</h1> - -<p>This component demonstrates fetching data from a service.</p> - -@if (forecasts == null) -{ - <p><em>Loading...</em></p> -} -else -{ - <table class="table"> - <thead> - <tr> - <th>Date</th> - <th>Temp. (C)</th> - <th>Temp. (F)</th> - <th>Summary</th> - </tr> - </thead> - <tbody> - @foreach (var forecast in forecasts) - { - <tr> - <td>@forecast.Date.ToShortDateString()</td> - <td>@forecast.TemperatureC</td> - <td>@forecast.TemperatureF</td> - <td>@forecast.Summary</td> - </tr> - } - </tbody> - </table> -} - -@code { - private WeatherForecast[]? forecasts; - - protected override async Task OnInitializedAsync() - { - forecasts = await ForecastService.GetForecastAsync(DateOnly.FromDateTime(DateTime.Now)); - } -} |
