public void Enqueue(Notification notification)
        {
            var context = _connectionManager.GetHubContext<NotificationHub>();
            _notificationRepository.Insert(notification);

            context.Clients[notification.UserId].notify(new List<Notification>() { notification });
        }
 public void Insert(Notification entity)
 {
     _collection.Insert(entity);
 }
 // POST api/notification
 public void Post(Notification entity)
 {
     entity.CreatedDateTime = DateTime.Now;
     _notificationQueue.Enqueue(entity);
 }