title: Using DbContext in a Class in .net core 3.1
body: <p>I am having trouble calling my class when trying to use the database in the class.  I have my context setup as so</p>
  
  <pre><code>public class AppDbContext : DbContext
  {
      public DbSet&lt;User&gt; Users {get; set;}
      public AppDbContext(DbContextOptions&lt;AppDbContext&gt; options)
          : base(options)
      { }
  }
  </code></pre>
  
  <p>I try to access my database in the class using this method</p>
  
  <pre><code>private AppDbContext db;
  
  public PasswordManager(AppDbContext db)
  {
      this.db = db;
  }
  </code></pre>
  
  <p>The problem that I'm running into is when I try to use that class and do something like <code>new PasswordManager()</code> it wants a parameter sent for the db in the constructor.  What am I doing wrong?  I don't want to pass the database as a parameter, but I need to use the database in the class for data.  Should I be using a <code>using</code> statement instead when in a class?</p>