title: How do I retrieve and set user_version in SQLite DB with EF
body: <p>What I am trying to do is load in and set the user_version (PRAGMA user_version) from my SQLite database. I am using entity framework, but if I can't do it through that, then I need to be able to do it some other way possible within C# 4.0.</p>
  
  <p>I tried:</p>
  
  <pre><code>this.DatabaseConnection.Connection.Open();
  System.Data.Common.DbCommand cmd = this.DatabaseConnection.Connection.CreateCommand();
  cmd.CommandText = "PRAGMA user_version";
  cmd.CommandType = System.Data.CommandType.Text;
  System.Data.Common.DbDataReader reader = cmd.ExecuteReader();
  </code></pre>
  
  <p>where DatabaseConnection is my EF context and Connection is the DbConnection object within the context, but I get an exception:</p>
  
  <blockquote>
    <p>The query syntax is not valid. Near
    identifier 'user_version', line 1,
    column 8.</p>
  </blockquote>