コード例 #1
0
        public void CreateNotification(int petId)
        {
            var watchlists = _watchlistRepository.GetWatchlistFromPetId(petId);

            foreach (var watchlist in watchlists)
            {
                _notificationRepository.CreateNotification(petId, watchlist.UserId);
            }
            _hubContext.Clients.All.InvokeAsync("readNotifications", "");
        }