From c2698a66c2abe9a422b693a1a9bcd5d75e6a4414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A8=81=E5=8B=9D=20=E5=BC=B5?= Date: Wed, 24 Apr 2024 12:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=8A=E6=9B=B4=20=E6=A0=B9=E6=93=9A?= =?UTF-8?q?=E9=80=B2=E5=85=A5=E4=BD=8D=E7=BD=AE=E7=A6=81=E5=85=A5=E8=BB=8A?= =?UTF-8?q?=E8=BC=9B=E6=90=9C=E5=B0=8B=20=E6=9C=80=E5=A4=9A500=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Yuntech_in_car_tableController.cs | 3 ++- WebApi_data_value/Program.cs | 2 ++ WebApi_data_value/Properties/launchSettings.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/WebApi_data_value/Controllers/Yuntech_in_car_tableController.cs b/WebApi_data_value/Controllers/Yuntech_in_car_tableController.cs index 5a35512..07af8b0 100644 --- a/WebApi_data_value/Controllers/Yuntech_in_car_tableController.cs +++ b/WebApi_data_value/Controllers/Yuntech_in_car_tableController.cs @@ -10,6 +10,7 @@ using Parking_space_WebAPI.Services; using Parking_space_WebAPI.ViewModel; using Parking_space_WebAPI.Authorization; + namespace Parking_space_WebAPI.Controllers { @@ -92,7 +93,7 @@ namespace Parking_space_WebAPI.Controllers in_time = c.in_time, out_time = c.out_time, location = c.location, - }).ToListAsync(); + }).Skip(0).Take(500).ToListAsync(); return in_car_table; diff --git a/WebApi_data_value/Program.cs b/WebApi_data_value/Program.cs index c40fff3..20da0f6 100644 --- a/WebApi_data_value/Program.cs +++ b/WebApi_data_value/Program.cs @@ -16,6 +16,8 @@ builder.Services.AddCors(); // Add services to the container. builder.Services.AddControllers(); + + // 連線PostgreSQL資料庫 var connectionString = "Server=140.125.20.183;UserID=postgres;password=EL404el404;Database=postgres;port=5432;Search Path=public;CommandTimeout=1800"; //var connectionString = "Server=127.0.0.1;UserID=postgres;password=EL404el404;Database=postgres;port=5432;Search Path=public;CommandTimeout=1800"; diff --git a/WebApi_data_value/Properties/launchSettings.json b/WebApi_data_value/Properties/launchSettings.json index e23e44a..1c82610 100644 --- a/WebApi_data_value/Properties/launchSettings.json +++ b/WebApi_data_value/Properties/launchSettings.json @@ -8,7 +8,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" }, "dotnetRunMessages": true, - "applicationUrl": "http://localhost:5174" + "applicationUrl": "http://localhost:7700" }, "IIS Express": { "commandName": "IISExpress",