diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 2d9098e..4c5dbd1 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -6,11 +6,6 @@ on: pull_request: branches: [ main ] -permissions: - id-token: write - contents: read - checks: write - jobs: build: diff --git a/src/MccSoft.IntegreSql.EF/DatabaseInitialization/BaseDatabaseInitializer.cs b/src/MccSoft.IntegreSql.EF/DatabaseInitialization/BaseDatabaseInitializer.cs index 7753933..8f04fe3 100644 --- a/src/MccSoft.IntegreSql.EF/DatabaseInitialization/BaseDatabaseInitializer.cs +++ b/src/MccSoft.IntegreSql.EF/DatabaseInitialization/BaseDatabaseInitializer.cs @@ -1,6 +1,7 @@ using System; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; namespace MccSoft.IntegreSql.EF.DatabaseInitialization; @@ -56,6 +57,7 @@ DatabaseSeedingOptions databaseSeedingOptions .ConfigureAwait(false) .GetAwaiter() .GetResult(); + options.ConfigureWarnings(x => x.Ignore(CoreEventId.ManyServiceProvidersCreatedWarning)); UseProvider(options, connectionString); } diff --git a/src/MccSoft.IntegreSql.EF/NpgsqlDatabaseInitializer.cs b/src/MccSoft.IntegreSql.EF/NpgsqlDatabaseInitializer.cs index 51cb3dc..048fbac 100644 --- a/src/MccSoft.IntegreSql.EF/NpgsqlDatabaseInitializer.cs +++ b/src/MccSoft.IntegreSql.EF/NpgsqlDatabaseInitializer.cs @@ -223,8 +223,6 @@ await _integreSqlClient.RecreateTestDatabase( public override void UseProvider(DbContextOptionsBuilder options, string connectionString) { - options.ConfigureWarnings(x => x.Ignore(CoreEventId.ManyServiceProvidersCreatedWarning)); - var dataSourceBuilder = new NpgsqlDataSourceBuilder(connectionString); _adjustNpgsqlDataSource?.Invoke(dataSourceBuilder); var dataSource = dataSourceBuilder.Build();