title: Entity Framework Core SQLite Connection String Keyword not supported: version
body: <p>I created a ASP.NET MVC website using .NET Core 2.2 using a SQLite database. So far it's working well. Trouble begins when I want to add SQLite-specific keywords to the connection string, such as</p>
  
  <pre><code>Data Source=~\\App_Data\\MyDb.db; Version=3; DateTimeFormat=UnixEpoch; DateTimeKind=Utc
  </code></pre>
  
  <p>Now I get</p>
  
  <blockquote>
    <p>Keyword not supported: 'version'</p>
  </blockquote>
  
  <p>I register the database like this</p>
  
  <pre><code>// ConfigureServices(IServiceCollection services)
  var conn = Configuration.GetConnectionString("MyDB").Replace("~", _env.ContentRootPath);
  services.AddDbContext&lt;MyDBContext&gt;(options =&gt; options.UseSqlite(conn));
  </code></pre>
  
  <p>Then MyDBContext has</p>
  
  <pre><code>public partial class MyDBContext : DbContext
  {
      public MyDBContext() { }
  
      public SatrimonoContext(DbContextOptions&lt;MyDBContext&gt; options)
          : base(options) { }
  
      public virtual DbSet&lt;Book&gt; Book { get; set; }
  }
  </code></pre>
  
  <p>Then I use it in my page Model</p>
  
  <pre><code>private SatrimonoContext _db;
  
  public BookAccuracyListModel(SatrimonoContext dbContext)
  {
      _db = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
  }
  </code></pre>
  
  <p>and from there I can access _db normally via LINQ.</p>
  
  <p>Before posting here, I did plenty of research on the topic, and the best responses I found were <a href="https://github.com/aspnet/Microsoft.Data.Sqlite/issues/406#issuecomment-324689331" rel="noreferrer">this</a></p>
  
  <blockquote>
    <p>This provider is Microsoft.Data.Sqlite. Those connection strings are
    for System.Data.SQLite.</p>
    
    <p>We support the following keywords: Cache, Data Source, Mode.</p>
  </blockquote>
  
  <p>and <a href="https://stackoverflow.com/a/14468295/3960200">this</a></p>
  
  <blockquote>
    <p>The issue I was having was because I was trying to create a
    SqlConnection instead of a SQLiteConnection. Making that change solved
    my issue.</p>
  </blockquote>
  
  <p>However, if I'm doing it "right", I'm not creating the SqlConnection and thus can't change it to SQLiteConnection. The other response doesn't include a solution.</p>
  
  <p>So how do I get this to work the right way?</p>