public virtual ActivitySubscribeSetting Create(ActivitySubscribeSettingDto setting) { var createSetting = new ActivitySubscribeSetting { ActivityId = setting.ActivityId, CanSubscribe = setting.CanSubscribe, SubscribeNotes = setting.SubscribeNotes }; _activitySubscribeSettingRepository.Add(createSetting); return(createSetting); }
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); } }