示例#1
0
        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);
 }