Пример #1
0
        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())
            {
            }
        }
Пример #2
0
 public BackgroundScheduleProcessor(ILogger <BackgroundScheduleProcessor> logger,
                                    OkToWakeContext context)
 {
     _context = context;
     _logger  = logger;
 }