项目结构目录规划。
This commit is contained in:
1 parent
a054944e6e
commit
b32b8a78da
122 files changed
+3045
-1
No files matched your search
@@ -0,0 +1,14 @@
|
||||
namespace HelloShop.WebApp;
|
||||
|
||||
public class WeatherApiClient(HttpClient httpClient)
|
||||
{
|
||||
public async Task<WeatherForecast[]> GetWeatherAsync()
|
||||
{
|
||||
return await httpClient.GetFromJsonAsync<WeatherForecast[]>("/weatherforecast") ?? [];
|
||||
}
|
||||
}
|
||||
|
||||
public record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
|
||||
{
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
}
|
||||
Reference in new issue
Block a user