//static ~DBDataLayer()
        //{
        //    // do your work here
        //    _db.Dispose();
        //}

        public static void AddData(int indexItem, DataStruct data)
        {
            DBItemData temp = new DBItemData()
            {
                Time     = (XDate)data.time, Index = indexItem,
                Temper1  = data.temper1, Temper2 = data.temper2,
                Pressure = data.pressure, Level = data.level
            };

            AddData(indexItem, temp);
        }
 public static void AddData(int indexItem, DBItemData data)
 {
     data.Index = indexItem;
     _db.RunInTransaction(() => _db.Insert(data));
 }