public static void AddInstantElements(this IEnumerable <ITable> tables, Type type, bool addtoList = true) { DatabaseManager.GetInstance().WriterInstance(type, DatabaseAction.Add, tables.ToArray()); if (addtoList) { foreach (var table in tables) { SaveTask.AddToList(table); } } }
public static void AddInstantElement <T>(this T table, bool addtolist = true) where T : ITable { lock (Locker) { DatabaseWriter <T> .InstantInsert(table); if (addtolist) { SaveTask.AddToList(table); } } }