コード例 #1
0
ファイル: Ballot.cs プロジェクト: pimanac/ConsensusBot
        public void Insert()
        {
            // remove my existing vote

            var existing = Motion.Votes.Where(x => x.Moderator == Moderator).ToList();

            foreach (var item in existing.ToList())
            {
                existing.Remove(item);
            }

            Motion.Votes.Add(this);
            Database.InsertBallot(this);
            RedditClient.PostBallot(this);
            RedditClient.PostMotion(Motion);
        }
コード例 #2
0
 public void Insert()
 {
     this.Id = Database.InsertMotion(this);
     RedditClient.PostMotion(this);
     Database.UpdateMotion(this);
 }