NonInventPurchasingSystem/CPRNIMS.Domain/UIServices/Updater/CartHub.cs
2026-01-20 07:44:30 +08:00

22 lines
559 B
C#

using Microsoft.AspNetCore.SignalR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CPRNIMS.Domain.UIServices.Updater
{
public class CartHub : Hub
{
public async Task UpdateCartCount(int count)
{
await Clients.All.SendAsync("ReceiveCartUpdate", count);
}
public async Task UpdateUserCartCount(string userId, int count)
{
await Clients.User(userId).SendAsync("ReceiveCartUpdate", count);
}
}
}