Ejemplo n.º 1
0
        public void AddComment(AnswerComment model)
        {
            // 쿼리문 댓글 입력 및 게시판 코멘트 수 추가
            string sql = @"
            Insert Into AnswersComments (ArticleId , Name, Opinion, Password )
            Values (@ArticleId , @Name, @Opinion, @Password );

            Update Answers Set CommentCount = CommentCount +1 Where Id = @ArticleId
            ";

            // 파라미터 추가
            var parameters = new DynamicParameters();

            parameters.Add("@ArticleId", value: model.ArticleId, dbType: DbType.Int32);
            parameters.Add("@Name", value: model.Name, dbType: DbType.String);
            parameters.Add("@Opinion", value: model.Opinion, dbType: DbType.String);
            parameters.Add("@Password", value: model.Password, dbType: DbType.String);

            // 디비 실행
            db.Execute(sql, parameters, commandType: CommandType.Text);
        }
Ejemplo n.º 2
0
 public bool Edit(AnswerComment model)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 3
0
 public AnswerComment Add(AnswerComment model)
 {
     throw new NotImplementedException();
 }
 public void AddComment(AnswerComment model)
 {
     throw new NotImplementedException();
 }