Пример #1
0
        public async Task <IEnumerable <UploadFile> > FetchAsync(PostType postType, int postId = 0)
        {
            if (postId > 0)
            {
                var filter = new AttachmentFilterSpecifications(postType, postId);
                return(await _uploadFileRepository.ListAsync(filter));
            }

            return(await _uploadFileRepository.ListAsync(new AttachmentFilterSpecifications(postType)));
        }
Пример #2
0
        public async Task <IEnumerable <UploadFile> > FetchByIdsAsync(IList <int> ids)
        {
            var filter = new AttachmentFilterSpecifications(ids);

            return(await _uploadFileRepository.ListAsync(filter));
        }