public void AddNotificationSetting(UserNotificationSetting setting) { if (!NotificationSetting.Exists(x => x.NotificationCodeId == setting.NotificationCodeId)) { NotificationSetting.Add(setting); } EntityUpdated(); }
public List <UserNotificationSetting> AddNotificationSettings(List <UserNotificationSetting> setting) { foreach (var item in setting) { if (!NotificationSetting.Exists(x => x.NotificationCodeId == item.NotificationCodeId)) { NotificationSetting.Add(item); } } EntityUpdated(); return(setting); }