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",