protected virtual NotificationSetting Find(ActivityEventNotifierIdentity activityEventNotifierIdentity) { var notifierId = activityEventNotifierIdentity.NotifierType.ToInt(); var notificationId = activityEventNotifierIdentity.Event.NotificationType.ToInt(); var activityTypeId = activityEventNotifierIdentity.Event.ActivityType.ToInt(); return(_repository.Find(s => s.ActivityType == activityTypeId && s.NotificationType == notificationId && s.NotifierType == notifierId)); }
public virtual NotifierSettingModel <T> Get <T>(ActivityEventNotifierIdentity activityEventNotifierIdentity) where T : INotifierTemplate { var defaultTemplate = _backofficeNotificationSettingsProvider.Get <T>(activityEventNotifierIdentity); if (defaultTemplate == null) { return(null); } var(setting, _) = FindOrCreateSetting <T>(activityEventNotifierIdentity); var mappedSetting = MappedNotifierSetting(setting, activityEventNotifierIdentity, defaultTemplate); return(mappedSetting); }