コード例 #1
0
        public static void Init()
        {
            if (!IsExsistDb())
            {
                CreateDB();
            }

            using (SqliteWrapper sqliteWrapper = new SqliteWrapper())
            {
                foreach (var tn in NotExsistTableList())
                {
                    sqliteWrapper.CreateTable(tn);
                }
            }
        }
コード例 #2
0
        private static List <string> NotExsistTableList()
        {
            List <string> list = new List <string>();

            using (SqliteWrapper sqliteWrapper = new SqliteWrapper())
            {
                IEnumerable <SqliteMasterModel> sres = sqliteWrapper.ExecuteNotKeySelect <SqliteMasterModel>();
                foreach (var r in TableInfo.GetAllTableNameList())
                {
                    if (sres.Count(a => a.Name.Equals(r) && a.Type.Equals("table")) == 0)
                    {
                        list.Add(r);
                    }
                }
            }
            return(list);
        }