/// <summary> /// 构造函数 /// </summary> /// <param name="noticeSettings"></param> /// <param name="invitationSettings"></param> public MessagesSettingEditModel(NoticeSettings noticeSettings, InvitationSettings invitationSettings) { if (noticeSettings != null) { NoticeTypeSettings = noticeSettings.NoticeTypeSettingses; } if (invitationSettings != null) { InvitationTypeSettings = invitationSettings.InvitationTypeSettingses; } }
/// <summary> /// 转换为实体 /// </summary> /// <param name="invitationSettings"></param> /// <returns></returns> public NoticeSettings AsMessagesSettings(out InvitationSettings invitationSettings) { NoticeSettings noticeSettings = new NoticeSettings(); noticeSettings.NoticeTypeSettingses = NoticeTypeSettings; invitationSettings = new InvitationSettings(); invitationSettings.InvitationTypeSettingses = InvitationTypeSettings; return(noticeSettings); }
public void Save(NoticeSettings noticeSettings) { repository.Save(noticeSettings); }