From 0db72739aa9106c286d35bf2848d15ade4437591 Mon Sep 17 00:00:00 2001 From: Cristiano Date: Thu, 6 Nov 2025 17:51:00 +0100 Subject: [PATCH] End of the day --- .../Deliverers/CreateDelivererEndpoint.cs | 14 ++++++-------- .../Deliverers/GetAllDelivererEndpoint.cs | 3 +-- .../Endpoints/Deliverers/GetDelivererEndpoint.cs | 10 ++++------ .../Deliverers/UpdateDelivererEndpoint.cs | 10 ++++------ PyroFetes/PyroFetes.csproj | 1 + PyroFetes/Repositories/PyrofetesRepository.cs | 8 ++++++++ 6 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 PyroFetes/Repositories/PyrofetesRepository.cs diff --git a/PyroFetes/Endpoints/Deliverers/CreateDelivererEndpoint.cs b/PyroFetes/Endpoints/Deliverers/CreateDelivererEndpoint.cs index 6bbe746..c8e0e58 100644 --- a/PyroFetes/Endpoints/Deliverers/CreateDelivererEndpoint.cs +++ b/PyroFetes/Endpoints/Deliverers/CreateDelivererEndpoint.cs @@ -5,7 +5,9 @@ using PyroFetes.Models; namespace PyroFetes.Endpoints.Deliverers; -public class CreateDelivererEndpoint(PyroFetesDbContext database) : Endpoint +public class CreateDelivererEndpoint( + PyroFetesDbContext database, + AutoMapper.IMapper mapper) : Endpoint { public override void Configure() { @@ -20,15 +22,11 @@ public class CreateDelivererEndpoint(PyroFetesDbContext database) : Endpoint(newDeliverer), ct); } } diff --git a/PyroFetes/Endpoints/Deliverers/GetAllDelivererEndpoint.cs b/PyroFetes/Endpoints/Deliverers/GetAllDelivererEndpoint.cs index 47cafc6..a0ce359 100644 --- a/PyroFetes/Endpoints/Deliverers/GetAllDelivererEndpoint.cs +++ b/PyroFetes/Endpoints/Deliverers/GetAllDelivererEndpoint.cs @@ -1,8 +1,7 @@ +using AutoMapper.QueryableExtensions; using FastEndpoints; using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; using PyroFetes.DTO.Deliverer.Response; -using PyroFetes.Models; namespace PyroFetes.Endpoints.Deliverers; diff --git a/PyroFetes/Endpoints/Deliverers/GetDelivererEndpoint.cs b/PyroFetes/Endpoints/Deliverers/GetDelivererEndpoint.cs index 35a4b69..b5cfe90 100644 --- a/PyroFetes/Endpoints/Deliverers/GetDelivererEndpoint.cs +++ b/PyroFetes/Endpoints/Deliverers/GetDelivererEndpoint.cs @@ -10,7 +10,9 @@ public class GetDelivererRequest public int DelivererId { get; set; } } -public class GetDelivererEndpoint(PyroFetesDbContext database) : Endpoint +public class GetDelivererEndpoint( + PyroFetesDbContext database, + AutoMapper.IMapper mapper) : Endpoint { public override void Configure() { @@ -29,11 +31,7 @@ public class GetDelivererEndpoint(PyroFetesDbContext database) : Endpoint(deliverer), ct); } } \ No newline at end of file diff --git a/PyroFetes/Endpoints/Deliverers/UpdateDelivererEndpoint.cs b/PyroFetes/Endpoints/Deliverers/UpdateDelivererEndpoint.cs index b8c7a5e..f962ef0 100644 --- a/PyroFetes/Endpoints/Deliverers/UpdateDelivererEndpoint.cs +++ b/PyroFetes/Endpoints/Deliverers/UpdateDelivererEndpoint.cs @@ -6,7 +6,9 @@ using PyroFetes.Models; namespace PyroFetes.Endpoints.Deliverers; -public class UpdateDelivererEndpoint(PyroFetesDbContext database) : Endpoint +public class UpdateDelivererEndpoint( + PyroFetesDbContext database, + AutoMapper.IMapper mapper) : Endpoint { public override void Configure() { @@ -29,11 +31,7 @@ public class UpdateDelivererEndpoint(PyroFetesDbContext database) : Endpoint(deliverer), ct); } } \ No newline at end of file diff --git a/PyroFetes/PyroFetes.csproj b/PyroFetes/PyroFetes.csproj index 48c4c03..5cfbe87 100644 --- a/PyroFetes/PyroFetes.csproj +++ b/PyroFetes/PyroFetes.csproj @@ -7,6 +7,7 @@ + diff --git a/PyroFetes/Repositories/PyrofetesRepository.cs b/PyroFetes/Repositories/PyrofetesRepository.cs new file mode 100644 index 0000000..0916abd --- /dev/null +++ b/PyroFetes/Repositories/PyrofetesRepository.cs @@ -0,0 +1,8 @@ +using Ardalis.Specification.EntityFrameworkCore; + +namespace PyroFetes.Repositories; + +public abstract class PyrofetesRepository(PyroFetesDbContext databaseContext, AutoMapper.IMapper mapper) : RepositoryBase(databaseContext) where T : class +{ + +}