Пример #1
0
        public TelegramBotManagerMigrationsDbContext CreateDbContext(string[] args)
        {
            TelegramBotManagerEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <TelegramBotManagerMigrationsDbContext>()
                          .UseNpgsql(configuration.GetConnectionString("Default"));

            return(new TelegramBotManagerMigrationsDbContext(builder.Options));
        }
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     TelegramBotManagerEfCoreEntityExtensionMappings.Configure();
 }