mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2025-12-06 05:32:03 +01:00
13 lines
272 B
C#
13 lines
272 B
C#
|
|
using Data.Models;
|
|||
|
|
using Microsoft.AspNetCore.SignalR;
|
|||
|
|
|
|||
|
|
namespace BlazorWebAssembly.Server.Hubs;
|
|||
|
|
|
|||
|
|
public class BlogNotificationHub : Hub
|
|||
|
|
{
|
|||
|
|
public async Task SendNotification(BlogPost post)
|
|||
|
|
{
|
|||
|
|
await Clients.All.SendAsync("BlogPostChanged", post);
|
|||
|
|
}
|
|||
|
|
}
|