Microsoft Copilot was utilized to generate the initial Blazor WebAssembly frontend UI components and set up the HttpClient service pattern inside InventoryApiService.cs to handle full CRUD requests to the ASP.NET Core Web API backend.
During integration, Copilot helped debug and resolve several runtime and build errors:
- CS5001 / CS0246 Errors: Restructured the root Blazor application entry points (
Program.cs,App.razor, andMainLayout.razor) and imports. - Port Conflicts (SocketException 10048): Identified port binding conflicts on port 5000 and configured
launchSettings.jsonto assign port 5001 for the frontend. - Rendering & Missing DOM Elements: Configured
wwwroot/index.htmlwith appropriate CSS bindings and fallback loading UI.
Copilot assisted in designing clean Data Transfer Objects (InventoryItemDto.cs) to ensure strict, typed JSON payload contracts between the REST API /api/Inventory endpoints and the Blazor client.
Optimized asynchronous service calls (GetFromJsonAsync, PostAsJsonAsync) for responsive UI updates, minimized unnecessary page re-renders, and simplified UI state handling.