示例#1
0
        public void DeleteCommentAttachment(int commentAttachmentId)
        {
            var rows = CommentsAttachments.Select(string.Format("CommentAttachmentID = {0}", commentAttachmentId));

            if (!rows.Any())
            {
                return;
            }

            var deletingCommentAttachment = rows.First();

            deletingCommentAttachment.Delete();

            UpdateCommentsAttachments();
        }
示例#2
0
        public void DeleteCommentAttachments(int commentId)
        {
            var rows = CommentsAttachments.Select(string.Format("CommentID = {0}", commentId));

            if (!rows.Any())
            {
                return;
            }

            foreach (var deletingCommentAttachment in rows)
            {
                deletingCommentAttachment.Delete();
            }

            UpdateCommentsAttachments();
        }