Exemple #1
0
        private static void AddConfiguration(HostBuilderContext context,
                                             IConfigurationBuilder builder)
        {
            var configuration    = builder.Build();
            var connectionString = configuration.GetConnectionString("DefaultConnection");

            builder.AddDbConfiguration(options => options.UseMySql(connectionString));
        }
Exemple #2
0
 public static void AddDbConfiguration(WebHostBuilderContext context, IConfigurationBuilder builder)
 {
     builder.AddDbConfiguration(context.Configuration);
     builder.Build();
 }