Coming From EF TO EF Core How Do I use using statement correct : I must be doing something wrong in my Context I have my context below which I want to wrap up in my manager class. And I want to be able to use the using statement so that my context is used only once.

    public class xxxDbContext : DbContext
    {
        public xxxDbContext(DbContextOptions<xxxDbContext> options)
            : base(options)
        { }
 
        public DbSet<JobsList> JobListingss { get; set; }
        public DbSet<Clients> ClientListings { get; set; }
        public DbSet<Engineer> EngineerListing { get; set; }

        public DbSet<Case> CasesListing { get; set; }
    }

But When I want to use my context in my using statement such as 
  
    public class xxxContext
    {
    
                xxxDbContext _db = new xxxDbContext();
    
                public List<Case> GetAllCases(int databaseId)
                {
                    List<Case> q = new List<Case>();
    
                    using (var myContext = new xxxDbContext(what must I reference here ?)))
                    {
    
                        q = myContext.Cases.Where(w => w.databaseID == databaseId).OrderBy(o => o.CustomerName).ToList();
                    }
        return q;
    
                }

        }

Before I was just able to make a parameter less construct can I do same here for core or does that override what is meant to be done.

Also what is best practise should I have a separate class for all these functions or should I have a partial class based on my context?.

