예제 #1
0
        /// <summary>
        /// 删除UserId相关的附件
        /// </summary>
        /// <param name="userId">上传者Id</param>
        public virtual void DeletesByUserId(long userId)
        {
            IEnumerable <T> attachments = GetsByUserId(userId);

            foreach (var attachment in attachments)
            {
                DeleteStoredFile(attachment);
            }
            string tenantTypeId = this.TenantAttachmentSettings.TenantTypeId;

            attachmentRepository.DeletesByUserId(tenantTypeId, userId);
        }