Пример #1
0
        public static DomainPhotos RemoveCopyrightedPhotos(this DomainPhotos domainPhotos)
        {
            var filteredPhotos = domainPhotos.Photos
                                 .Where(photo => photo.IsLicensed)
                                 .ToList();

            return(new DomainPhotos(filteredPhotos, domainPhotos.Page, domainPhotos.Pages));
        }
Пример #2
0
        private DomainPhotos RemoveOptedOutUserPhotos(DomainPhotos domainPhotos)
        {
            var optedOutUserIds = _userService.GetOptoutUserIds();
            var filteredPhotos = domainPhotos.Photos
                .Where(photo => !optedOutUserIds.Contains(photo.AuthorId))
                .ToList();

            return new DomainPhotos(filteredPhotos, domainPhotos.Page, domainPhotos.Pages);
        }