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" }); } }
public int AddComment(Comment comment) { CommentDAL.AddComment(comment); return(CommentDAL.GetLastRowIndex()); }