private IEnumerable <Notification> GetNotificationsForNewFirmInitiatives( IEnumerable <Tuple <string, string, string, Int32?> > projectData) { List <Notification> notifications = null; if (projectData != null && projectData.Any()) { notifications = new List <Notification>(); } var offerings = projectData.Select(x => x.Item4).Distinct(); var offeringsColl = _commonService.GetOfferings(); foreach (var offering in offerings) { var bodyRequest = new FirmInitiativeTaskNotificationContent { ProjectData = projectData.Where(x => x.Item4 == offering), OfferingName = offeringsColl.Where(x => x.Id == Convert.ToInt32(offering)).Select(x => x.Description).FirstOrDefault() }; var recipients = ConfigurationManager.AppSettings["TestMode"] == "true" ? _reportingService.GetDummyConsultingUsers() : _reportingService.GetConsultingUsersForServiceLine(Convert.ToInt32(offering)); recipients = recipients != null && recipients.Any() ? recipients : _commonService.GetDefaultConsultingMailboxes(); notifications.Add(new Notification { BccAddresses = recipients?.ToList(), ToAddresses = ConfigurationManager.AppSettings[Constants.DcodeEmailId], Subject = _notificationContentGenerator.GetSubject(null), Body = _notificationContentGenerator.GetEmailBody(bodyRequest) }); } return(notifications); }