public static void OpenConnection()
 {
     if (Connection != null && Connection.State == ConnectionState.Open)
     {
         Connection.Close();
     }
     Connection = SqLiteBase.SimpleDbConnection();
     Connection.Open();
 }
Beispiel #2
0
        public void CreateDatabase(List <Type> lista)
        {
            var sql = String.Empty;

            foreach (var item in lista)
            {
                sql += GetSQLClass(item);
            }

            using (var cnn = SqLiteBase.SimpleDbConnection())
            {
                cnn.Open();
                cnn.Execute(sql);
            }
        }