public static void RemoveInstantElements(this IEnumerable <ITable> tables, Type type, bool removefromList = true) { DatabaseManager.GetInstance().WriterInstance(type, DatabaseAction.Remove, tables.ToArray()); if (removefromList) { foreach (var table in tables) { SaveTask.RemoveFromList(table); } } }
public static void RemoveInstantElement <T>(this T table, bool removefromList = true) where T : ITable { lock (Locker) { DatabaseWriter <T> .InstantRemove(table); if (removefromList) { SaveTask.RemoveFromList(table); } } }