public void AddNotification(string name, string subjectPrefix, IEnumerable<string> recipientEmails) { var n = new Notification() { Name = name, EmailSubjectPrefix = subjectPrefix }; foreach(var r in recipientEmails) { n.Recipients.Add(r); } notifications.Add(n); }
public void AddNotification(Notification notification) { if (notifications.Where(n => n.Name == notification.Name).FirstOrDefault() == null) { notifications.Add(notification); } }