Esempio n. 1
0
        public async Task <IList <Tag> > GetCompoundImageTagsByMapId(Guid mapId)
        {
            var compoundImagesUnderMap = await _compoundImagesRepository.GetByMapId(mapId);

            var tags = new List <Tag>();

            foreach (var compoundImage in compoundImagesUnderMap)
            {
                var tagsForCompoundImages = await _compoundImageTagsRepository.GetTagsByCompoundImageId(compoundImage.Id);

                tags.AddRange(tagsForCompoundImages.Select(tag => (Tag)tag));
            }

            return(tags);
        }
Esempio n. 2
0
 public async Task ValidateCompoundImageTagData(IList <Tag> tags, Guid compoundImageId)
 {
     RemoveMatchingTags(tags, (await _compoundImageTagsRepository.GetTagsByCompoundImageId(compoundImageId))
                        .Select(tag => (Tag)tag)
                        .ToList());
 }