From c5805d979bac7ddcca3ec2f345537ad9765b73e8 Mon Sep 17 00:00:00 2001 From: colesm Date: Thu, 9 Oct 2025 16:09:30 +0200 Subject: [PATCH] MaJ des .txt en .cs --- .../{CreateColorEndpoint => CreateColorEndpoint.cs} | 8 ++++---- .../{DeleteColorEndpoint => DeleteColorEndpoint.cs} | 10 +++++----- ...GetAllColorsEndpoint => GetAllColorsEndpoint.cs} | 6 +++--- .../Color/{GetColorEndpoint => GetColorEndpoint.cs} | 7 +++---- .../{UpdateColorEndpoint => UpdateColorEndpoint.cs} | 9 ++++----- ...CreateEffectEndpoint => CreateEffectEndpoint.cs} | 10 +++++----- ...DeleteEffectEndpoint => DeleteEffectEndpoint.cs} | 10 +++++----- ...tAllEffectsEndpoint => GetAllEffectsEndpoint.cs} | 6 +++--- .../{GetEffectEndpoint => GetEffectEndpoint.cs} | 7 +++---- ...UpdateEffectEndpoint => UpdateEffectEndpoint.cs} | 9 ++++----- ...teMaterialEndpoint => CreateMaterialEndpoint.cs} | 13 +++++++------ ...teMaterialEndpoint => DeleteMaterialEndpoint.cs} | 10 +++++----- ...MaterialsEndpoint => GetAllMaterialsEndpoint.cs} | 8 ++++---- .../{GetMaterialEndpoint => GetMaterialEndpoint.cs} | 9 ++++----- ...teMaterialEndpoint => UpdateMaterialEndpoint.cs} | 13 ++++++------- 15 files changed, 65 insertions(+), 70 deletions(-) rename PyroFetes/Endpoints/Color/{CreateColorEndpoint => CreateColorEndpoint.cs} (70%) rename PyroFetes/Endpoints/Color/{DeleteColorEndpoint => DeleteColorEndpoint.cs} (69%) rename PyroFetes/Endpoints/Color/{GetAllColorsEndpoint => GetAllColorsEndpoint.cs} (68%) rename PyroFetes/Endpoints/Color/{GetColorEndpoint => GetColorEndpoint.cs} (79%) rename PyroFetes/Endpoints/Color/{UpdateColorEndpoint => UpdateColorEndpoint.cs} (75%) rename PyroFetes/Endpoints/Effect/{CreateEffectEndpoint => CreateEffectEndpoint.cs} (69%) rename PyroFetes/Endpoints/Effect/{DeleteEffectEndpoint => DeleteEffectEndpoint.cs} (68%) rename PyroFetes/Endpoints/Effect/{GetAllEffectsEndpoint => GetAllEffectsEndpoint.cs} (68%) rename PyroFetes/Endpoints/Effect/{GetEffectEndpoint => GetEffectEndpoint.cs} (78%) rename PyroFetes/Endpoints/Effect/{UpdateEffectEndpoint => UpdateEffectEndpoint.cs} (74%) rename PyroFetes/Endpoints/Material/{CreateMaterialEndpoint => CreateMaterialEndpoint.cs} (67%) rename PyroFetes/Endpoints/Material/{DeleteMaterialEndpoint => DeleteMaterialEndpoint.cs} (68%) rename PyroFetes/Endpoints/Material/{GetAllMaterialsEndpoint => GetAllMaterialsEndpoint.cs} (66%) rename PyroFetes/Endpoints/Material/{GetMaterialEndpoint => GetMaterialEndpoint.cs} (76%) rename PyroFetes/Endpoints/Material/{UpdateMaterialEndpoint => UpdateMaterialEndpoint.cs} (70%) diff --git a/PyroFetes/Endpoints/Color/CreateColorEndpoint b/PyroFetes/Endpoints/Color/CreateColorEndpoint.cs similarity index 70% rename from PyroFetes/Endpoints/Color/CreateColorEndpoint rename to PyroFetes/Endpoints/Color/CreateColorEndpoint.cs index c194cea..4573468 100644 --- a/PyroFetes/Endpoints/Color/CreateColorEndpoint +++ b/PyroFetes/Endpoints/Color/CreateColorEndpoint.cs @@ -2,9 +2,9 @@ using API.DTO.Color.Request; using API.DTO.Color.Response; using FastEndpoints; -namespace API.Endpoints.Color; +namespace PyroFetes.Endpoints.Color; -public class CreateColorEndpoint(AppDbContext appDbContext) : Endpoint +public class CreateColorEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -19,8 +19,8 @@ public class CreateColorEndpoint(AppDbContext appDbContext) : Endpoint +public class DeleteColorEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -18,7 +18,7 @@ public class DeleteColorEndpoint(AppDbContext appDbContext) : Endpoint a.Id == req.Id, cancellationToken: ct); @@ -29,8 +29,8 @@ public class DeleteColorEndpoint(AppDbContext appDbContext) : Endpoint> +public class GetAllColorsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : EndpointWithoutRequest> { public override void Configure() { @@ -14,7 +14,7 @@ public class GetAllColorsEndpoint(AppDbContext appDbContext) : EndpointWithoutRe public override async Task HandleAsync(CancellationToken ct) { - List responseDto = await appDbContext.Colors + List responseDto = await pyrofetesdbcontext.Colors .Select(a => new GetColorDto { Id = a.Id, diff --git a/PyroFetes/Endpoints/Color/GetColorEndpoint b/PyroFetes/Endpoints/Color/GetColorEndpoint.cs similarity index 79% rename from PyroFetes/Endpoints/Color/GetColorEndpoint rename to PyroFetes/Endpoints/Color/GetColorEndpoint.cs index f309862..dcacb8a 100644 --- a/PyroFetes/Endpoints/Color/GetColorEndpoint +++ b/PyroFetes/Endpoints/Color/GetColorEndpoint.cs @@ -1,16 +1,15 @@ using API.DTO.Color.Response; using FastEndpoints; -using Microsoft.AspNetCore.Authentication; using Microsoft.EntityFrameworkCore; -namespace API.Endpoints.Color; +namespace PyroFetes.Endpoints.Color; public class GetColorRequest { public int Id { get; set; } } -public class GetColorEndpoint(AppDbContext appDbContext) : Endpoint +public class GetColorEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -20,7 +19,7 @@ public class GetColorEndpoint(AppDbContext appDbContext) : Endpoint x.Id == req.Id, cancellationToken: ct); diff --git a/PyroFetes/Endpoints/Color/UpdateColorEndpoint b/PyroFetes/Endpoints/Color/UpdateColorEndpoint.cs similarity index 75% rename from PyroFetes/Endpoints/Color/UpdateColorEndpoint rename to PyroFetes/Endpoints/Color/UpdateColorEndpoint.cs index be82f4b..b05c896 100644 --- a/PyroFetes/Endpoints/Color/UpdateColorEndpoint +++ b/PyroFetes/Endpoints/Color/UpdateColorEndpoint.cs @@ -1,12 +1,11 @@ using API.DTO.Color.Request; using API.DTO.Color.Response; using FastEndpoints; -using Microsoft.AspNetCore.Server.Kestrel; using Microsoft.EntityFrameworkCore; -namespace API.Endpoints.Color; +namespace PyroFetes.Endpoints.Color; -public class UpdateColorEndpoint(AppDbContext appDbContext) : Endpoint +public class UpdateColorEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -16,7 +15,7 @@ public class UpdateColorEndpoint(AppDbContext appDbContext) : Endpoint x.Id == req.Id, cancellationToken: ct); @@ -28,7 +27,7 @@ public class UpdateColorEndpoint(AppDbContext appDbContext) : Endpoint +namespace PyroFetes.Endpoints.Effect; + +public class CreateEffectEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -19,8 +19,8 @@ public class CreateEffectEndpoint(AppDbContext appDbContext) : Endpoint +public class DeleteEffectEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -17,7 +17,7 @@ public class DeleteEffectEndpoint(AppDbContext appDbContext) : Endpoint a.Id == req.Id, cancellationToken: ct); @@ -28,8 +28,8 @@ public class DeleteEffectEndpoint(AppDbContext appDbContext) : Endpoint> +public class GetAllEffectsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : EndpointWithoutRequest> { public override void Configure() { @@ -14,7 +14,7 @@ public class GetAllEffectsEndpoint(AppDbContext appDbContext) : EndpointWithoutR public override async Task HandleAsync(CancellationToken ct) { - List responseDto = await appDbContext.Effects + List responseDto = await pyrofetesdbcontext.Effects .Select(a => new GetEffectDto { Id = a.Id, diff --git a/PyroFetes/Endpoints/Effect/GetEffectEndpoint b/PyroFetes/Endpoints/Effect/GetEffectEndpoint.cs similarity index 78% rename from PyroFetes/Endpoints/Effect/GetEffectEndpoint rename to PyroFetes/Endpoints/Effect/GetEffectEndpoint.cs index c6230f1..cd2a91d 100644 --- a/PyroFetes/Endpoints/Effect/GetEffectEndpoint +++ b/PyroFetes/Endpoints/Effect/GetEffectEndpoint.cs @@ -1,16 +1,15 @@ using API.DTO.Effect.Response; using FastEndpoints; -using Microsoft.AspNetCore.Authentication; using Microsoft.EntityFrameworkCore; -namespace API.Endpoints.Effect; +namespace PyroFetes.Endpoints.Effect; public class GetEffectRequest { public int Id { get; set; } } -public class GetEffectEndpoint(AppDbContext appDbContext) : Endpoint +public class GetEffectEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -20,7 +19,7 @@ public class GetEffectEndpoint(AppDbContext appDbContext) : Endpoint x.Id == req.Id, cancellationToken: ct); diff --git a/PyroFetes/Endpoints/Effect/UpdateEffectEndpoint b/PyroFetes/Endpoints/Effect/UpdateEffectEndpoint.cs similarity index 74% rename from PyroFetes/Endpoints/Effect/UpdateEffectEndpoint rename to PyroFetes/Endpoints/Effect/UpdateEffectEndpoint.cs index 2728b81..ac5bffe 100644 --- a/PyroFetes/Endpoints/Effect/UpdateEffectEndpoint +++ b/PyroFetes/Endpoints/Effect/UpdateEffectEndpoint.cs @@ -1,12 +1,11 @@ using API.DTO.Effect.Request; using API.DTO.Effect.Response; using FastEndpoints; -using Microsoft.AspNetCore.Server.Kestrel; using Microsoft.EntityFrameworkCore; -namespace API.Endpoints.Effect; +namespace PyroFetes.Endpoints.Effect; -public class UpdateEffectEndpoint(AppDbContext appDbContext) : Endpoint +public class UpdateEffectEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -16,7 +15,7 @@ public class UpdateEffectEndpoint(AppDbContext appDbContext) : Endpoint x.Id == req.Id, cancellationToken: ct); @@ -28,7 +27,7 @@ public class UpdateEffectEndpoint(AppDbContext appDbContext) : Endpoint +namespace PyroFetes.Endpoints.Material; + +public class CreateMaterialEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -15,20 +16,20 @@ public class CreateMaterialEndpoint(AppDbContext appDbContext) : Endpoint +public class DeleteMaterialEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -16,7 +16,7 @@ public class DeleteMaterialEndpoint(AppDbContext appDbContext) : Endpoint a.Id == req.Id, cancellationToken: ct); @@ -27,8 +27,8 @@ public class DeleteMaterialEndpoint(AppDbContext appDbContext) : Endpoint> +public class GetAllMaterialsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : EndpointWithoutRequest> { public override void Configure() { @@ -14,11 +14,11 @@ public class GetAllMaterialsEndpoint(AppDbContext appDbContext) : EndpointWithou public override async Task HandleAsync(CancellationToken ct) { - List responseDto = await appDbContext.Materials + List responseDto = await pyrofetesdbcontext.Materials .Select(a => new GetMaterialDto { Id = a.Id, - Name = a.Name, + Label = a.Name, Quantity = a.Quantity, WarehouseId = a.WarehouseId, } diff --git a/PyroFetes/Endpoints/Material/GetMaterialEndpoint b/PyroFetes/Endpoints/Material/GetMaterialEndpoint.cs similarity index 76% rename from PyroFetes/Endpoints/Material/GetMaterialEndpoint rename to PyroFetes/Endpoints/Material/GetMaterialEndpoint.cs index 0f05f23..2f60a18 100644 --- a/PyroFetes/Endpoints/Material/GetMaterialEndpoint +++ b/PyroFetes/Endpoints/Material/GetMaterialEndpoint.cs @@ -1,16 +1,15 @@ using API.DTO.Material.Response; using FastEndpoints; -using Microsoft.AspNetCore.Authentication; using Microsoft.EntityFrameworkCore; -namespace API.Endpoints.Material; +namespace PyroFetes.Endpoints.Material; public class GetMaterialRequest { public int Id { get; set; } } -public class GetMaterialEndpoint(AppDbContext appDbContext) : Endpoint +public class GetMaterialEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -20,7 +19,7 @@ public class GetMaterialEndpoint(AppDbContext appDbContext) : Endpoint x.Id == req.Id, cancellationToken: ct); @@ -34,7 +33,7 @@ public class GetMaterialEndpoint(AppDbContext appDbContext) : Endpoint +public class UpdateMaterialEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { @@ -16,7 +15,7 @@ public class UpdateMaterialEndpoint(AppDbContext appDbContext) : Endpoint x.Id == req.Id, cancellationToken: ct); @@ -27,14 +26,14 @@ public class UpdateMaterialEndpoint(AppDbContext appDbContext) : Endpoint