public bool AddMediaItemToSet(string SetName, Guid ImageID) { ResultSet sets = GetAllMediaSets(); if (sets.Exists(s => (s as MediaSet).SetName == SetName)) { MediaSet set = sets.Find(s => (s as MediaSet).SetName == SetName) as MediaSet; set.ImageIDS.Add(ImageID); return(true); } return(false); }
public MediaSet AddMediaSet(string SetName) { ResultSet sets = GetAllMediaSets(); if (!sets.Exists(s => (s as MediaSet).SetName == SetName)) { Guid setID = GetGuid(); MediaSet set = new MediaSet(setID, SetName); Model.Taggables.Add(setID, set); return(set); } return(null); }
/*public ResultSet RunQuery(string Query) * { * * }*/ public ResultSet GetMediaItemsForSet(Guid SetID) { if (Model.Taggables.ContainsKey(SetID)) { MediaSet set = Model.Taggables[SetID] as MediaSet; if (set != null) { ResultSet results = new ResultSet(); foreach (Guid imageID in set.ImageIDS) { results.Add(Model.Taggables[imageID]); } return(results); } } return(new ResultSet()); }