public static void UpVoteAnswer(int answerID) { Answers a = Answers.Read(answerID); a.UpVotes = a.UpVotes + 1; IDbConnection db = new SqlConnection(server); db.Update(a); }
public static void DownVoteAnswer(int answerID) { Answers a = Answers.Read(answerID); a.UpVotes = a.UpVotes - 1; IDbConnection db = new SqlConnection(server); //db.Update(a); db.Query($"Update Answers SET Upvotes='{a.UpVotes}' where ID='{answerID}'"); }