title: Add new table to SQLite using an ASP.NET Core Web API app
body: <p>I am learning how to write an ASP.NET Core Web API application with Sqlite database access.</p>
  <p>I have a problem of adding new table to my application using Sqlite database.</p>
  <p>I saw the Microsoft article how to create and initialize Sqlite database <a href="https://docs.microsoft.com/en-us/ef/core/get-started/overview/first-app?tabs=netcore-cli" rel="nofollow noreferrer">Getting Started with EF Core</a>) like below.</p>
  <p>I have tried to add</p>
  <pre><code>public DbSet&lt;myClass&gt; Test { get; set; }
  </code></pre>
  <p>just after</p>
  <pre><code>public DbSet&lt;Post&gt; Posts { get; set; }
  </code></pre>
  <p>thinking the code will automatically add the <code>Test</code> table, but it does not (I am using DB Browser for SQLite tool to view the database).</p>
  <p>I have searched dozen of articles but have found no answer. Could someone point me in the right direction please?</p>
  <pre><code>using Microsoft.EntityFrameworkCore;
  using System;
  using System.Collections.Generic;
  
  public class BloggingContext : DbContext
  {
      public DbSet&lt;Blog&gt; Blogs { get; set; }
      public DbSet&lt;Post&gt; Post { get; set; }
  
      public string DbPath { get; }
  
      public BloggingContext()
      {
          var folder = Environment.SpecialFolder.LocalApplicationData;
          var path = Environment.GetFolderPath(folder);
          DbPath = System.IO.Path.Join(path, &quot;blogging.db&quot;);
      }
  
      // The following configures EF to create a Sqlite database file in the
      // special &quot;local&quot; folder for your platform.
      protected override void OnConfiguring(DbContextOptionsBuilder options)
          =&gt; options.UseSqlite($&quot;Data Source={DbPath}&quot;);
  }
  
  public class Blog
  {
      public int BlogId { get; set; }
      public string Url { get; set; }
  
      public List&lt;Post&gt; Posts { get; } = new();
  }
  
  public class Post
  {
      public int PostId { get; set; }
      public string Title { get; set; }
      public string Content { get; set; }
  
      public int BlogId { get; set; }
      public Blog Blog { get; set; }
  }
  </code></pre>