@page "/notes" @inject HttpClient Http @inject NavigationManager NavigationManager

Notes

@foreach (var note in NoteList) { @if(note.Contact is not null) { } } @code { public List NoteList { get; set; } = new List(); protected override async Task OnInitializedAsync() { var result = await Http.GetFromJsonAsync>("api/notes"); if (result is not null) NoteList = result; } void NavigateToContact(int contactId) { NavigationManager.NavigateTo($"contacts/edit/{contactId}"); } }