diff --git a/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/ParkingLotService.API.csproj b/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/ParkingLotService.API.csproj new file mode 100644 index 0000000..0c56541 --- /dev/null +++ b/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/ParkingLotService.API.csproj @@ -0,0 +1,17 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + diff --git a/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/ParkingLotService.API.http b/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/ParkingLotService.API.http new file mode 100644 index 0000000..3bbbc16 --- /dev/null +++ b/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/ParkingLotService.API.http @@ -0,0 +1,6 @@ +@ParkingLotService.API_HostAddress = http://localhost:5148 + +GET {{ParkingLotService.API_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/Program.cs b/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/Program.cs new file mode 100644 index 0000000..06dd2a4 --- /dev/null +++ b/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/Program.cs @@ -0,0 +1,36 @@ + +namespace ParkingLotService.API +{ + public class Program + { + public static void Main(string[] args) + { + var builder = WebApplication.CreateBuilder(args); + + // Add services to the container. + + builder.Services.AddControllers(); + // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle + builder.Services.AddEndpointsApiExplorer(); + builder.Services.AddSwaggerGen(); + + var app = builder.Build(); + + // Configure the HTTP request pipeline. + if (app.Environment.IsDevelopment()) + { + app.UseSwagger(); + app.UseSwaggerUI(); + } + + app.UseHttpsRedirection(); + + app.UseAuthorization(); + + + app.MapControllers(); + + app.Run(); + } + } +} diff --git a/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/Properties/launchSettings.json b/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/Properties/launchSettings.json new file mode 100644 index 0000000..5a8a11f --- /dev/null +++ b/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/Properties/launchSettings.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:21887", + "sslPort": 44303 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5148", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:7229;http://localhost:5148", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/appsettings.json b/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/WeiCloud.Fusion/WeiCloud.Fusion.sln b/WeiCloud.Fusion/WeiCloud.Fusion.sln index 77dd247..1eec34f 100644 --- a/WeiCloud.Fusion/WeiCloud.Fusion.sln +++ b/WeiCloud.Fusion/WeiCloud.Fusion.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.14.36310.24 d17.14 +VisualStudioVersion = 17.14.36310.24 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AspireApp", "AspireApp", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}" EndProject @@ -37,6 +37,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Video.Domain", "VideoServic EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Video.Store", "VideoService\Video.Store\Video.Store.csproj", "{058C0CAB-5956-4811-8340-86919DDB2845}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ParkingLotService.API", "ParkingLotService\ParkingLotService.API\ParkingLotService.API.csproj", "{D97C471C-3190-4F8E-A916-7A056A65EDCE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -87,6 +89,10 @@ Global {058C0CAB-5956-4811-8340-86919DDB2845}.Debug|Any CPU.Build.0 = Debug|Any CPU {058C0CAB-5956-4811-8340-86919DDB2845}.Release|Any CPU.ActiveCfg = Release|Any CPU {058C0CAB-5956-4811-8340-86919DDB2845}.Release|Any CPU.Build.0 = Release|Any CPU + {D97C471C-3190-4F8E-A916-7A056A65EDCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D97C471C-3190-4F8E-A916-7A056A65EDCE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D97C471C-3190-4F8E-A916-7A056A65EDCE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D97C471C-3190-4F8E-A916-7A056A65EDCE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -103,6 +109,7 @@ Global {44E0B645-482B-4841-87E7-1E9166700185} = {19A25984-FFA8-49BE-A710-6F269A406C61} {6CBD9E97-4FEF-4DA2-ADFB-21B4D9DB366F} = {19A25984-FFA8-49BE-A710-6F269A406C61} {058C0CAB-5956-4811-8340-86919DDB2845} = {19A25984-FFA8-49BE-A710-6F269A406C61} + {D97C471C-3190-4F8E-A916-7A056A65EDCE} = {0A3134C8-219C-4674-B152-1FA6561E4217} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {379A56DA-D3F0-4E7E-8FF7-DA8E20015BF3}