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(); }
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(); }