private void ExecuteBuildConfigurationSql(AppSettingContext context, BuildConfiguration buildConfiguration) { string sql = null; if (buildConfiguration == BuildConfiguration.Debug) { sql = this.GetType().Assembly.GetManifestResourceText(DbConstants.APPLICATION_CONTEXT_SEED_DEBUG_RESOURCE); } else { throw new DbUpdateException($"An error occured while seeding the database:\tCannot identify build configuration for connection string '{context.Database.Connection.ConnectionString}'."); } if (sql != null) { context.Database.ExecuteSqlCommand(sql); } }
private void ExecuteSeedSql(AppSettingContext context) { var sql = this.GetType().Assembly.GetManifestResourceText(DbConstants.APPLICATION_CONTEXT_SEED_RESOURCE); context.Database.ExecuteSqlCommand(sql); }
public RepositoryApplicationSettingsInitializer(AppSettingContext context) : base(context) { }