예제 #1
0
파일: Comment.cs 프로젝트: frg/congress
 public Comment(SetterComment SetterComment)
 {
     PostId = SetterComment.PostId;
     CommentId = SetterComment.CommentId;
     CreatedByUID = SetterComment.CreatedByUID;
     Content = SetterComment.Content;
     CreatedAt = DateTime.UtcNow;
     DeletedAt = null;
 }
예제 #2
0
파일: Comment.cs 프로젝트: frg/congress
        //public static WriteConcernResult Create(MongoDBConnection db, SetterComment SetterComment)
        //{
        //    // TODO
        //}
        public static Comment IsUniqueComment(MongoDBConnection db, SetterComment SetterComment)
        {
            if (db.Comments.Count() > 0)
            {
                return db.Comments.FindOne(Query<Comment>.Where(i => i.PostId == SetterComment.PostId && (i.PostId == SetterComment.PostId && i.CreatedByUID == SetterComment.CreatedByUID)));
            }

            return null;
        }