From 114b95b1cadc3f5d7eefe92dc0648c1030dd54d4 Mon Sep 17 00:00:00 2001 From: Greg Cook Date: Tue, 18 Feb 2025 04:15:38 -0700 Subject: [PATCH] bou-1 - ensuring we are creating the correct NUGET module in the Bounteous organization --- Bounteous.Data.PostgreSQL.sln | 1 + README.md | 5 +++++ .../Bounteous.Data.PostgreSQL.csproj | 12 ++++++------ .../PostgresDbContextFactory.cs | 5 ++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Bounteous.Data.PostgreSQL.sln b/Bounteous.Data.PostgreSQL.sln index faf2643..90d6cd0 100644 --- a/Bounteous.Data.PostgreSQL.sln +++ b/Bounteous.Data.PostgreSQL.sln @@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution", "Solution", "{090740F2-87A6-47A3-8262-A7F70474B429}" ProjectSection(SolutionItems) = preProject .nuget.config = .nuget.config + README.md = README.md EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "github", "github", "{1AC18BC1-E8FF-4719-8D20-CB6484BB2678}" diff --git a/README.md b/README.md index 50706ca..682f7c0 100644 --- a/README.md +++ b/README.md @@ -1 +1,6 @@ # Bounteous.Data.PostgreSQL + + +This module creates a DbContextFactory fot PostgreSQL. + +This module will also contain any future PostgreSQL-specific features as required. diff --git a/src/Bounteous.Data.PostgreSQL/Bounteous.Data.PostgreSQL.csproj b/src/Bounteous.Data.PostgreSQL/Bounteous.Data.PostgreSQL.csproj index 0591bbf..46ea5fc 100644 --- a/src/Bounteous.Data.PostgreSQL/Bounteous.Data.PostgreSQL.csproj +++ b/src/Bounteous.Data.PostgreSQL/Bounteous.Data.PostgreSQL.csproj @@ -8,16 +8,16 @@ + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + diff --git a/src/Bounteous.Data.PostgreSQL/PostgresDbContextFactory.cs b/src/Bounteous.Data.PostgreSQL/PostgresDbContextFactory.cs index cc51ce6..3d5d4d6 100644 --- a/src/Bounteous.Data.PostgreSQL/PostgresDbContextFactory.cs +++ b/src/Bounteous.Data.PostgreSQL/PostgresDbContextFactory.cs @@ -1,5 +1,4 @@ using Microsoft.EntityFrameworkCore; -using Xerris.DotNet.Data; namespace Bounteous.Data.PostgreSQL; @@ -10,11 +9,11 @@ public PostgresDbContextFactory(IConnectionBuilder connectionBuilder, IDbContext { } - protected override DbContextOptions ApplyOptions(bool sensitiveDataLoggingEnabled = false) + protected override DbContextOptions ApplyOptions(bool sensitiveDataLoggingEnabled = false) { AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); - return new DbContextOptionsBuilder().UseNpgsql(ConnectionBuilder.AdminConnectionString, + return new DbContextOptionsBuilder().UseNpgsql(ConnectionBuilder.AdminConnectionString, sqlOptions => { sqlOptions.EnableRetryOnFailure(); }) .UseSnakeCaseNamingConvention() .EnableSensitiveDataLogging(sensitiveDataLoggingEnabled: sensitiveDataLoggingEnabled)