diff --git a/Client/.vscode/launch.json b/Client/.vscode/launch.json
new file mode 100644
index 0000000..b7bcc2f
--- /dev/null
+++ b/Client/.vscode/launch.json
@@ -0,0 +1,20 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Attach to Edge",
+ "port": 9222,
+ "request": "attach",
+ "type": "msedge",
+ "webRoot": "${workspaceFolder}",
+ "url": "http://localhost:5055/counter",
+ "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
+ },
+ {
+ "name": "Launch Microsoft Edge and open the Edge DevTools",
+ "request": "launch",
+ "type": "vscode-edge-devtools.debug",
+ "url": "http://localhost:5055"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Client/.vscode/tasks.json b/Client/.vscode/tasks.json
new file mode 100644
index 0000000..48b462e
--- /dev/null
+++ b/Client/.vscode/tasks.json
@@ -0,0 +1,41 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/Expose.MyIT.Client.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/Expose.MyIT.Client.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "watch",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "watch",
+ "run",
+ "--project",
+ "${workspaceFolder}/Expose.MyIT.Client.csproj"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Client/App.razor.cs b/Client/App.razor.cs
new file mode 100644
index 0000000..b7e8a22
--- /dev/null
+++ b/Client/App.razor.cs
@@ -0,0 +1,4 @@
+namespace Expose.MyIT.Client;
+
+public partial class App
+{ }
\ No newline at end of file
diff --git a/Client/Expose.MyIT.Client.csproj b/Client/Expose.MyIT.Client.csproj
index 3cfec0a..98d8596 100644
--- a/Client/Expose.MyIT.Client.csproj
+++ b/Client/Expose.MyIT.Client.csproj
@@ -9,12 +9,12 @@
service-worker-assets.js
-
-
+
+
-
-
+
+
diff --git a/Client/Pages/FetchData.razor.cs b/Client/Pages/FetchData.razor.cs
index 27c8c7e..752acbb 100644
--- a/Client/Pages/FetchData.razor.cs
+++ b/Client/Pages/FetchData.razor.cs
@@ -7,16 +7,24 @@ namespace Expose.MyIT.Client.Pages;
public partial class FetchData
{
- [Inject] protected HttpClient? Http { get; set; }
+ [Inject] protected HttpClient? HttpClient { get; set; }
+ [Inject] protected ILogger? Logger { get; set; }
private WeatherForecast[]? _Forecasts;
protected override async Task OnInitializedAsync()
{
- if (Http is null)
- throw new NullReferenceException(nameof(Http));
- string controllerName = MyIT.Shared.Models.Stateless.Methods.IWeatherForecastController.GetRouteName();
- // _SsaOrders = await Http.GetFromJsonAsync("sample-data/weather.json");
- _Forecasts = await Http.GetFromJsonAsync($"api/{controllerName}");
+ if (Logger is null)
+ throw new NullReferenceException(nameof(Logger));
+ if (HttpClient is null)
+ throw new NullReferenceException(nameof(HttpClient));
+ string controllerName = MyIT.Shared.Models.Stateless.IWeatherForecastController