private async Task Send(Consts.HubActivity method, Product product) { var productJson = JsonConvert.SerializeObject(product, new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); await _context.Clients.All.SendAsync(method.ToString().ToLower(), productJson); }
private async Task Send(Consts.HubActivity method, int productId) { await _context.Clients.All.SendAsync(method.ToString().ToLower(), productId); }