Example #1
0
        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);
                }
            }
        }
Example #2
0
        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);
                }
            }
        }