using System.Net.Http.Json; using Microsoft.AspNetCore.Components; using ReportingServices.Shared.HelperClasses; using ReportingServices.Shared.Models.ProductionReport; namespace ReportingServices.Client.Pages; public partial class EditDailyReport { [Inject] protected HttpClient? HttpClient { get; set; } [Inject] protected ILogger? Logger { get; set; } [Parameter] public ManualReportEntries? Rpt { get; set; } protected override async Task OnInitializedAsync() { if (Logger is null) throw new NullReferenceException(nameof(Logger)); if (HttpClient is null) throw new NullReferenceException(nameof(HttpClient)); Rpt = await HttpClient.GetFromJsonAsync("http://localhost:5054/DailyReportInfo.json"); } }