private static async Task EnsureDbCreatedAndSeedWithCountOfAsync(DbContextOptions <OkToWakeContext> options) { var factory = new LoggerFactory(); var builder = new DbContextOptionsBuilder <OkToWakeContext>(options) .UseLoggerFactory(factory); using var context = new OkToWakeContext(builder.Options); if (await context.Database.EnsureCreatedAsync()) { } }
public BackgroundScheduleProcessor(ILogger <BackgroundScheduleProcessor> logger, OkToWakeContext context) { _context = context; _logger = logger; }