public static void OpenConnection() { if (Connection != null && Connection.State == ConnectionState.Open) { Connection.Close(); } Connection = SqLiteBase.SimpleDbConnection(); Connection.Open(); }
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); } }