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); }
public void Insert() { this.Id = Database.InsertMotion(this); RedditClient.PostMotion(this); Database.UpdateMotion(this); }