From 6d466b79e098d0fbb1570aaf9cb68238257f3437 Mon Sep 17 00:00:00 2001 From: Extrimal Date: Mon, 6 May 2024 22:27:10 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B5=D1=89=D0=B5=20=D0=BE=D0=B4=D0=BD=D0=B0?= =?UTF-8?q?=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D1=81=D0=BE=D1=85=D1=80.=20=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hotel/HotelDatabaseImplement/HotelDataBase.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Hotel/HotelDatabaseImplement/HotelDataBase.cs b/Hotel/HotelDatabaseImplement/HotelDataBase.cs index 4e70968..ff85053 100644 --- a/Hotel/HotelDatabaseImplement/HotelDataBase.cs +++ b/Hotel/HotelDatabaseImplement/HotelDataBase.cs @@ -14,9 +14,11 @@ namespace HotelDatabaseImplement { if (optionsBuilder.IsConfigured == false) { - optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS01;Initial Catalog=HotelDatabaseBD;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + optionsBuilder.UseNpgsql(@"Host=localhost;Port=5432;Database=Hotel_Subd_DB;Username=postgres;Password=admin"); } base.OnConfiguring(optionsBuilder); + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true); } public virtual DbSet Bookings { get; set; } public virtual DbSet Clients { get; set; }