public static void StoreCollections(List <Models.Collection> records) { List <string> data = new List <string>(); foreach (Models.Collection item in records) { string serializedData = SerializeCollection(item); data.Add(serializedData); } DataAdapter.StoreRecords(data); }
public static List <Models.Collection> GetCollections() { List <Models.Collection> records = new List <Models.Collection>(); List <string> data = DataAdapter.GetRecords(); foreach (string item in data) { Models.Collection newCollection = DeserializeCollection(item); records.Add(newCollection); } return(records); }