C#C
C#4y ago
Hotz

[SOLVED] What is happening in this snippet?

My guess is: since AppDbContext inherits from DbContext, it also inherits the ctor and all the parameters that the ctor takes. This way, AppDbContext's ctor is being overwritten so that it only has the options parameter from its parent class. Is this correct?

public class AppDbContext : DbContext
{
    public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
    {
        
    }
}
Was this page helpful?