Browse Source

Synchronization code

pull/29/head
sunkaixuan 2 years ago
parent
commit
a409451314
  1. 9
      Src/Asp.Net/SqlSugar/Realization/PostgreSQL/PostgreSQLProvider.cs

9
Src/Asp.Net/SqlSugar/Realization/PostgreSQL/PostgreSQLProvider.cs

@ -12,7 +12,14 @@ namespace SqlSugar
{
public partial class PostgreSQLProvider : AdoProvider
{
public PostgreSQLProvider() { }
public PostgreSQLProvider()
{
if (SugarCompatible.IsFramework == false)
{
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
}
}
public override IDbConnection Connection
{
get

Loading…
Cancel
Save