Ejemplo n.º 1
0
        private static FavoritesInGroup[] SelectFavoriteIds(Favorite[] favorites)
        {
            var groupMembers = new FavoritesInGroup()
            {
                GroupId   = GROUP_GUID,
                Favorites = favorites.Select(f => f.Id).ToArray()
            };

            return(new FavoritesInGroup[] { groupMembers });
        }
Ejemplo n.º 2
0
        private List<IGroup> UpdateFavoritesInGroups(FavoritesInGroup[] favoritesInGroups)
        {
            List<IGroup> updatedGroups = new List<IGroup>();

            foreach (FavoritesInGroup favoritesInGroup in favoritesInGroups)
            {
                var group = this.groups[favoritesInGroup.GroupId] as Group;
                bool groupUpdated = this.UpdateFavoritesInGroup(group, favoritesInGroup.Favorites);
                if (groupUpdated)
                    updatedGroups.Add(group);
            }

            return updatedGroups;
        }