public AppDbContext(DbContextOptions <AppDbContext> options, ILogger <AppDbContext> logger) : base(options) { // This actually creates and initializes the database. Database.EnsureCreated(); _logger = logger; _logger.LogInformation($"############ Made an instance of AppDbContext (instance #{++_instanceCount})"); _logger.LogInformation($"############ Table Todo has {Todo.CountAsync().Result} records.)"); }