fix timestamps in databaseImplementation
This commit is contained in:
parent
32485b08e4
commit
68e542bce8
@ -12,6 +12,9 @@ namespace FlowerShopDatabaseImplement
|
|||||||
optionsBuilder.UseNpgsql(@"Host=localhost;Database=FlowerShopHardDatabaseTestFull;Username=postgres;Password=postgres");
|
optionsBuilder.UseNpgsql(@"Host=localhost;Database=FlowerShopHardDatabaseTestFull;Username=postgres;Password=postgres");
|
||||||
}
|
}
|
||||||
base.OnConfiguring(optionsBuilder);
|
base.OnConfiguring(optionsBuilder);
|
||||||
|
|
||||||
|
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
|
||||||
|
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
|
||||||
}
|
}
|
||||||
public virtual DbSet<Component> Components { set; get; }
|
public virtual DbSet<Component> Components { set; get; }
|
||||||
public virtual DbSet<Flower> Flowers { set; get; }
|
public virtual DbSet<Flower> Flowers { set; get; }
|
||||||
|
Loading…
Reference in New Issue
Block a user