diff --git a/FlowerShop/FlowerShopDatabaseImplement/FlowerShopDatabase.cs b/FlowerShop/FlowerShopDatabaseImplement/FlowerShopDatabase.cs index a56596c..da5d2cf 100644 --- a/FlowerShop/FlowerShopDatabaseImplement/FlowerShopDatabase.cs +++ b/FlowerShop/FlowerShopDatabaseImplement/FlowerShopDatabase.cs @@ -12,6 +12,9 @@ namespace FlowerShopDatabaseImplement optionsBuilder.UseNpgsql(@"Host=localhost;Database=FlowerShopHardDatabaseTestFull;Username=postgres;Password=postgres"); } base.OnConfiguring(optionsBuilder); + + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true); } public virtual DbSet Components { set; get; } public virtual DbSet Flowers { set; get; }