@page "/authorities" @using VisaApiClient @inherits BlazorWebAssemblyVisaApiClient.Components.Base.VisaClientComponentBase @foreach (var authority in authorities) { var path = $"authorities/{authority.Id}/{authority.Email}"; }
Email
@authority.Email |
@code { private List authorities = []; protected override async Task OnInitializedAsync() { try { authorities = (await Client.GetAuthorityAccountsAsync()).ToList(); } catch (Exception e) { ErrorHandler.Handle(e); } } private async Task Delete(UserModel authority) { try { await Client.RemoveAuthorityAccountAsync(authority.Id); authorities.Remove(authority); StateHasChanged(); } catch (Exception e) { ErrorHandler.Handle(e); } } }