Skip to content

Commit

Permalink
EnableLegacyTimestampBehavior in `AbpEntityFrameworkCorePostgreSqlM…
Browse files Browse the repository at this point in the history
…odule`

Resolve #11357
  • Loading branch information
maliming committed Jan 19, 2022
1 parent 571e4e1 commit 86f3966
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using System;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore.DistributedEvents;
using Volo.Abp.Guids;
using Volo.Abp.Modularity;
Expand All @@ -10,6 +11,12 @@ namespace Volo.Abp.EntityFrameworkCore.PostgreSql;
)]
public class AbpEntityFrameworkCorePostgreSqlModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
}

public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpSequentialGuidGeneratorOptions>(options =>
Expand Down

0 comments on commit 86f3966

Please sign in to comment.