Exemplo n.º 1
0
        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);
                }
            }
        }
Exemplo n.º 2
0
        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);
                }
            }
        }