/// <summary> /// 添加投票信息,并将选项写入对应表中 /// </summary> /// <param name="vote"></param> /// <returns></returns> public int AddVote(VotingTheme vote) { int id = _voteMapper.SaveVoteTheme(vote); _optionMapper.SaveOptions(id, vote.Options); return(id); }