public static TagGroups Load() { TagGroups tagGroups = new TagGroups(); foreach (Tag tag in Tag.Load()) { tagGroups.GroupBySite(tag.Site).Tags.Add(tag); } return(tagGroups); }
public static void Save(TagGroups tagGroups) { System.Diagnostics.Debug.WriteLine("Save:Save"); List <Tag> Tags = new List <Tag>(); foreach (TagGroup tagGroup in tagGroups) { foreach (Tag tag in tagGroup.Tags) { Tags.Add(tag); } } Models.Tag.Save(Tags); }