예제 #1
0
        public ResultModel AddComment(AddCommentModel model)
        {
            if (!string.IsNullOrEmpty(model.Title) && !string.IsNullOrEmpty(model.Content))
            {
                return(commentDal.AddComment(model));
            }

            else
            {
                return(new ResultModel()
                {
                    IsSuccess = false,
                    Message = "Unsuccessful comment add operation"
                });
            }
        }
예제 #2
0
 public int AddComment(Comment comment)
 {
     CommentDAL.AddComment(comment);
     return(CommentDAL.GetLastRowIndex());
 }