Exemple #1
0
        public virtual ActivitySubscribeSetting Create(ActivitySubscribeSettingDto setting)
        {
            var createSetting = new ActivitySubscribeSetting
            {
                ActivityId     = setting.ActivityId,
                CanSubscribe   = setting.CanSubscribe,
                SubscribeNotes = setting.SubscribeNotes
            };

            _activitySubscribeSettingRepository.Add(createSetting);

            return(createSetting);
        }
Exemple #2
0
        public virtual void Save(ActivitySubscribeSettingDto setting)
        {
            var updateSetting = Get(setting.ActivityId);

            if (updateSetting == null)
            {
                Create(setting);
            }
            else
            {
                updateSetting.CanSubscribe   = setting.CanSubscribe;
                updateSetting.SubscribeNotes = setting.SubscribeNotes;

                _activitySubscribeSettingRepository.Update(updateSetting);
            }
        }