22 lines
559 B
C#
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);
|
|
}
|
|
}
|
|
}
|