finalisation des endpoints

This commit is contained in:
2025-11-13 15:11:12 +01:00
parent 55f92ad761
commit 5c12a45ae6
41 changed files with 79 additions and 258 deletions

View File

@@ -1,10 +1,10 @@
using FastEndpoints;
using PF3.DTO.Staff.Request;
using PF3.DTO.Staff.Response;
using PyroFetes.DTO.Staff.Request;
using PyroFetes.DTO.Staff.Response;
namespace PF3.Endpoints.Staff;
namespace PyroFetes.Endpoints.Staff;
public class CreateStaffEndpoint(PF3DbContext pf3DbContext):Endpoint<CreateStaffDto, ReadStaffDto>
public class CreateStaffEndpoint(PyroFetesDbContext pf3DbContext):Endpoint<CreateStaffDto, ReadStaffDto>
{
public override void Configure()
{
@@ -14,7 +14,7 @@ public class CreateStaffEndpoint(PF3DbContext pf3DbContext):Endpoint<CreateStaff
public override async Task HandleAsync(CreateStaffDto req, CancellationToken ct)
{
var staff = new Models.Staff
var staff = new PyroFetes.Models.Staff
{
FirstName = req.FirstName,
LastName = req.LastName,

View File

@@ -1,10 +1,10 @@
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using PF3.DTO.Staff.Request;
using PyroFetes.DTO.Staff.Request;
namespace PF3.Endpoints.Staff;
namespace PyroFetes.Endpoints.Staff;
public class DeleteStaffEndpoint(PF3DbContext pf3DbContext) : Endpoint<IdStaffDto>
public class DeleteStaffEndpoint(PyroFetesDbContext pf3DbContext) : Endpoint<IdStaffDto>
{
public override void Configure()
{

View File

@@ -1,10 +1,10 @@
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using PF3.DTO.Staff.Response;
using PyroFetes.DTO.Staff.Response;
namespace PF3.Endpoints.Staff;
namespace PyroFetes.Endpoints.Staff;
public class GetAllStaffEndpoint(PF3DbContext pf3DbContext) : EndpointWithoutRequest<List<ReadStaffDto>>
public class GetAllStaffEndpoint(PyroFetesDbContext pf3DbContext) : EndpointWithoutRequest<List<ReadStaffDto>>
{
public override void Configure()
{

View File

@@ -1,11 +1,11 @@
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using PF3.DTO.Staff.Request;
using PF3.DTO.Staff.Response;
using PyroFetes.DTO.Staff.Request;
using PyroFetes.DTO.Staff.Response;
namespace PF3.Endpoints.Staff;
namespace PyroFetes.Endpoints.Staff;
public class GetStaffEndpoint(PF3DbContext pf3DbContext) : Endpoint<IdStaffDto, ReadStaffDto>
public class GetStaffEndpoint(PyroFetesDbContext pf3DbContext) : Endpoint<IdStaffDto, ReadStaffDto>
{
public override void Configure()
{

View File

@@ -1,11 +1,11 @@
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using PF3.DTO.Staff.Request;
using PF3.DTO.Staff.Response;
using PyroFetes.DTO.Staff.Request;
using PyroFetes.DTO.Staff.Response;
namespace PF3.Endpoints.Staff;
namespace PyroFetes.Endpoints.Staff;
public class UpdateStaffEndpoint(PF3DbContext pf3DbContext) : Endpoint<UpdateStaffDto, ReadStaffDto>
public class UpdateStaffEndpoint(PyroFetesDbContext pf3DbContext) : Endpoint<UpdateStaffDto, ReadStaffDto>
{
public override void Configure()
{