Example #1
0
 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);
 }
Example #2
0
 private async Task Send(Consts.HubActivity method, int productId)
 {
     await _context.Clients.All.SendAsync(method.ToString().ToLower(), productId);
 }