I have a method in my Razor page, that needs to be used in all my razor pages.
async Task ShowNotification(NotificationMessage message)
{
notificationService.Notify(message);
await InvokeAsync(() => { StateHasChanged(); });
}
What is the best practice to be able to share this method between razor pages and not have to put this method in each page?