public static void SendNotification(NotificationApiModel apiModel, List <USER> users) { var sendTo = users.Distinct().Where(c => c != null).ToList(); var notiCreated = _notificationRepository.Create(apiModel, sendTo); //send notification if (notiCreated.isCreated) { //send to person who performs the delete apiModel.Info(); apiModel.id = notiCreated.notiId; NotificationHub.pushNotification(apiModel, sendTo.Select(c => c.ID).ToList()); } }