變更名稱

This commit is contained in:
威勝 張 2024-03-05 19:49:58 +08:00
parent 1563577166
commit a2ca6b3b7e
60 changed files with 145 additions and 144 deletions

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Authorization; namespace Parking_space_WebAPI.Authorization;
[AttributeUsage(AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Method)]
public class AllowAnonymousAttribute : Attribute public class AllowAnonymousAttribute : Attribute

View File

@ -1,8 +1,8 @@
namespace WebApi_data_value.Authorization; namespace Parking_space_WebAPI.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Filters;
using WebApi_data_value.Entities; using Parking_space_WebAPI.Entities;
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class AuthorizeAttribute : Attribute, IAuthorizationFilter public class AuthorizeAttribute : Attribute, IAuthorizationFilter

View File

@ -1,6 +1,6 @@
namespace WebApi_data_value.Authorization; namespace Parking_space_WebAPI.Authorization;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
public class JwtMiddleware public class JwtMiddleware
{ {

View File

@ -1,12 +1,12 @@
namespace WebApi_data_value.Authorization; namespace Parking_space_WebAPI.Authorization;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims; using System.Security.Claims;
using System.Text; using System.Text;
using WebApi_data_value.Entities; using Parking_space_WebAPI.Entities;
using WebApi_data_value.Helpers; using Parking_space_WebAPI.Helpers;
public interface IJwtUtils public interface IJwtUtils
{ {

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,14 +5,14 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.ViewModel; using Parking_space_WebAPI.ViewModel;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -6,11 +6,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,12 +5,12 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.ViewModel; using Parking_space_WebAPI.ViewModel;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -6,12 +6,12 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.ViewModel; using Parking_space_WebAPI.ViewModel;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,12 +5,12 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.ViewModel; using Parking_space_WebAPI.ViewModel;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -6,11 +6,11 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using MySqlX.XDevAPI.Common; using MySqlX.XDevAPI.Common;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -6,9 +6,9 @@ using Mysqlx;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using NuGet.Common; using NuGet.Common;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
[ApiController] [ApiController]
[Authorize] [Authorize]

View File

@ -5,12 +5,12 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.ViewModel; using Parking_space_WebAPI.ViewModel;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]

View File

@ -5,12 +5,12 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
using WebApi_data_value.ViewModel; using Parking_space_WebAPI.ViewModel;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers namespace Parking_space_WebAPI.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]

View File

@ -8,17 +8,17 @@ EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
ARG BUILD_CONFIGURATION=Release ARG BUILD_CONFIGURATION=Release
WORKDIR /src WORKDIR /src
COPY ["WebApi_data_value/WebApi_data_value.csproj", "WebApi_data_value/"] COPY ["Parking_space_WebAPI/Parking_space_WebAPI.csproj", "Parking_space_WebAPI/"]
RUN dotnet restore "./WebApi_data_value/./WebApi_data_value.csproj" RUN dotnet restore "./Parking_space_WebAPI/./Parking_space_WebAPI.csproj"
COPY . . COPY . .
WORKDIR "/src/WebApi_data_value" WORKDIR "/src/Parking_space_WebAPI"
RUN dotnet build "./WebApi_data_value.csproj" -c $BUILD_CONFIGURATION -o /app/build RUN dotnet build "./Parking_space_WebAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish FROM build AS publish
ARG BUILD_CONFIGURATION=Release ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./WebApi_data_value.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false RUN dotnet publish "./Parking_space_WebAPI.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final FROM base AS final
WORKDIR /app WORKDIR /app
COPY --from=publish /app/publish . COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WebApi_data_value.dll"] ENTRYPOINT ["dotnet", "Parking_space_WebAPI.dll"]

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Entities; namespace Parking_space_WebAPI.Entities;
using MessagePack; using MessagePack;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Helpers; namespace Parking_space_WebAPI.Helpers;
public class AppSettings public class AppSettings
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models; namespace Parking_space_WebAPI.Models;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;

View File

@ -1,6 +1,6 @@
namespace WebApi_data_value.Models; namespace Parking_space_WebAPI.Models;
using WebApi_data_value.Entities; using Parking_space_WebAPI.Entities;
public class AuthenticateResponse public class AuthenticateResponse
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_space_algorithm public class Parking_space_algorithm
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_cam public class Parking_spaces_cam
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_cam_ptz public class Parking_spaces_cam_ptz
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_cam_ptz_car_num_check public class Parking_spaces_cam_ptz_car_num_check
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_cam_ptz_pass public class Parking_spaces_cam_ptz_pass
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_cam_ptz_violation public class Parking_spaces_cam_ptz_violation
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_history public class Parking_spaces_history
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_instant public class Parking_spaces_instant
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_lcd_instand public class Parking_spaces_lcd_instand
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_roi public class Parking_spaces_roi
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_roi_car_num_check public class Parking_spaces_roi_car_num_check
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_roi_pass public class Parking_spaces_roi_pass
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_roi_violation public class Parking_spaces_roi_violation
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_total_table public class Parking_spaces_total_table
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Parking_spaces_violation_total_table public class Parking_spaces_violation_total_table
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Violation_car_table public class Violation_car_table
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Yuntech_cam public class Yuntech_cam
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Yuntech_cam_total_table public class Yuntech_cam_total_table
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models namespace Parking_space_WebAPI.Models
{ {
public class Yuntech_in_car_table public class Yuntech_in_car_table
{ {

View File

@ -7,9 +7,9 @@ using Microsoft.OpenApi.Models;
using System.Configuration; using System.Configuration;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.Helpers; using Parking_space_WebAPI.Helpers;
using WebApi_data_value.Services; using Parking_space_WebAPI.Services;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
//在 ASP.NET Core 中啟用 CORS (跨原始來源要求) //在 ASP.NET Core 中啟用 CORS (跨原始來源要求)
builder.Services.AddCors(); builder.Services.AddCors();
@ -29,7 +29,8 @@ builder.Services.AddDbContext<SqlContext>(opt =>
string connectionString = builder.Configuration.GetConnectionString("tarefasConnection"); string connectionString = builder.Configuration.GetConnectionString("tarefasConnection");
var serverVersion = ServerVersion.AutoDetect(connectionString); var serverVersion = ServerVersion.AutoDetect(connectionString);
opt.UseMySql(connectionString, serverVersion); opt.UseMySql(connectionString, serverVersion);
});*/ });
*/
//身分驗證 //身分驗證
@ -61,7 +62,7 @@ builder.Services.AddDbContext<SqlContext>(opt =>
}); });
services.AddSwaggerGen(c => services.AddSwaggerGen(c =>
{ {
c.SwaggerDoc("v1", new OpenApiInfo { Title = "WebApi_data_value", Version = "v1" }); c.SwaggerDoc("v1", new OpenApiInfo { Title = "Parking_space_WebAPI", Version = "v1" });
// Configure Swagger to use JWT authentication // Configure Swagger to use JWT authentication
c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme

View File

@ -1,6 +1,6 @@
{ {
"profiles": { "profiles": {
"WebApi_data_value": { "Parking_space_WebAPI": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true, "launchBrowser": true,
"launchUrl": "swagger", "launchUrl": "swagger",

View File

@ -4,11 +4,11 @@ using System.Linq;
using Microsoft.Extensions.Configuration.Json; using Microsoft.Extensions.Configuration.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
using WebApi_data_value.Entities; using Parking_space_WebAPI.Entities;
namespace WebApi_data_value.Services namespace Parking_space_WebAPI.Services
{ {
public class SqlContext : DbContext public class SqlContext : DbContext
{ {

View File

@ -1,8 +1,8 @@
namespace WebApi_data_value.Services; namespace Parking_space_WebAPI.Services;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Authorization; using Parking_space_WebAPI.Authorization;
using WebApi_data_value.Entities; using Parking_space_WebAPI.Entities;
using WebApi_data_value.Models; using Parking_space_WebAPI.Models;
public interface IUserService public interface IUserService
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.ViewModel namespace Parking_space_WebAPI.ViewModel
{ {
public class Single_Parking_spaces public class Single_Parking_spaces
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.ViewModel namespace Parking_space_WebAPI.ViewModel
{ {
public class Single_license_plate_number public class Single_license_plate_number
{ {

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.ViewModel namespace Parking_space_WebAPI.ViewModel
{ {
public class Single_violation_car_table public class Single_violation_car_table
{ {

View File

@ -1,4 +1,4 @@
@model WebApi_data_value.Models.Parking_space_algorithm @model Parking_space_WebAPI.Models.Parking_space_algorithm
@{ @{
ViewData["Title"] = "Create"; ViewData["Title"] = "Create";

View File

@ -1,4 +1,4 @@
@model WebApi_data_value.Models.Parking_space_algorithm @model Parking_space_WebAPI.Models.Parking_space_algorithm
@{ @{
ViewData["Title"] = "Delete"; ViewData["Title"] = "Delete";

View File

@ -1,4 +1,4 @@
@model WebApi_data_value.Models.Parking_space_algorithm @model Parking_space_WebAPI.Models.Parking_space_algorithm
@{ @{
ViewData["Title"] = "Details"; ViewData["Title"] = "Details";

View File

@ -1,4 +1,4 @@
@model WebApi_data_value.Models.Parking_space_algorithm @model Parking_space_WebAPI.Models.Parking_space_algorithm
@{ @{
ViewData["Title"] = "Edit"; ViewData["Title"] = "Edit";

View File

@ -1,4 +1,4 @@
@model IEnumerable<WebApi_data_value.Models.Parking_space_algorithm> @model IEnumerable<Parking_space_WebAPI.Models.Parking_space_algorithm>
@{ @{
ViewData["Title"] = "Index"; ViewData["Title"] = "Index";