예제 #1
0
        /// <summary>
        /// 删除OwnerId相关的附件
        /// </summary>
        /// <param name="ownerId">拥有者Id</param>
        public virtual void DeletesByOwnerId(long ownerId)
        {
            IEnumerable <T> attachments = Gets(ownerId);

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

            attachmentRepository.DeletesByOwnerId(tenantTypeId, ownerId);
        }