title: SqliteException: SQLite Error 1: 'no such table: Patients'. - I can not seem to fix the problem
body: <p>I am looking at how to get around this problem. I am tempted to restart from scratch. It is very annoying and I have looked everywhere online how to resolve this Can anyone please help and answer this in the most simple terms possible. I did delete my original database and hit build to create a new one, but when I try to create a basic form of information I am hitting with the errors below.</p>
  <p>I tried to run a command line I seen someone on youtube do the update-database on the command line but it said no such thing exists</p>
  <p>The exact error that shows up is this:</p>
  <blockquote>
  <p>SqliteException: SQLite Error 1: 'no such table: Patients'.</p>
  </blockquote>
  <p>Then the red that shows up is this:</p>
  <pre><code>MS.Data.Services.PatientHutServiceDb.GetPatientByEmail(string email) in 
  PatientHutServiceDb.cs
  +
           return db.Patients.FirstOrDefault(e =&gt; e.EmailAddress == email);
  MMS.Data.Services.PatientHutServiceDb.AddPatient(Patient u) in PatientHutServiceDb.cs
   +
          var existing = GetPatientByEmail(u.EmailAddress); //Check if user has same email 
  address when creating a new user 
  MMS.Web.Controllers.PatientController.Create(Patient u) in PatientController.cs
  +
              svc.AddPatient(u);
  lambda_method35(Closure , object , object[] )
  </code></pre>
  <p>I feel like I need to update the database but I am not sure how to do this.</p>
  <p>So far the code I have is this:</p>
  <pre><code> DbContext: 
  
  
  namespace MMS.Data.Repositories
  </code></pre>
  <p>{
  public class PatientHutDbContext : DbContext
  {
  public DbSet Patients { get; set; }
  public DbSet Bookings { get; set; }</p>
  <pre><code>    // Could use SqlServer using connection below if installed
      protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
      {
          optionsBuilder               
              /** use simple logging to log the sql commands issued by entityframework **/ 
              //.LogTo(Console.WriteLine, LogLevel.Information)
              //.EnableSensitiveDataLogging()
              .UseSqlite(&quot;Filename=Patients.db&quot;); //Double check this !!!!!!!!!!!!!!!
      }
  
      public void Initialise() 
      {
          Database.EnsureDeleted();
          Database.EnsureCreated();
      }
  }
  </code></pre>
  <p>}</p>
  <p>In the <code>startup</code> I file I have:</p>
  <pre class="lang-cs prettyprint-override"><code>namespace MMS.Web
  {
      public class Startup
      {
          public Startup(IConfiguration configuration)
          {
              Configuration = configuration;
          }
  
          public IConfiguration Configuration { get; }
  
          // This method gets called by the runtime. Use this method to add services to the container.
          public void ConfigureServices(IServiceCollection services)
          {           
  
              services.AddControllersWithViews();
          }
  
          // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
          public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IServiceProvider provider)
          {
              if (env.IsDevelopment())
              {
                  app.UseDeveloperExceptionPage();             
                             
              }
              else
              {
                  app.UseExceptionHandler(&quot;/Home/Error&quot;);
                  // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                  app.UseHsts();
              }
              //app.UseHttpsRedirection();
              app.UseStaticFiles();
  
              app.UseRouting();
  
              app.UseAuthorization();
  
              app.UseEndpoints(endpoints =&gt;
              {
                  endpoints.MapControllerRoute(
                      name: &quot;default&quot;,
                      pattern: &quot;{controller=Home}/{action=Index}/{id?}&quot;);
              });
          }
      }
  }
  </code></pre>