I am storing a list of objects of a class to a SQLite table. The class has 30 strings and I have roughly 6000 objects of the class in my List. It's only 6MB. Breaking up this list and storing that takes almost a minute. But can I store the entire list as one? Here is my code so far:
List<TheClass> ListOfObjects;
public static void AddAllObjects() {
for (int i = 0; i < ListOfObjects.Count; i++) {
AddObject(ListOfObjects[i]);
}
}
public static void AddObject(Object obj) {
database.SaveItem(obj);
}
public void SaveItem<T>(T item) {
connection.Insert(item);
}