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,11 +1,11 @@
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using PF3.DTO.SoundCategory.Request;
using PF3.DTO.SoundCategory.Response;
using PyroFetes.DTO.SoundCategory.Request;
using PyroFetes.DTO.SoundCategory.Response;
namespace PF3.Endpoints.SoundCategory;
namespace PyroFetes.Endpoints.SoundCategory;
public class GetSoundCategoryEndpoint(PF3DbContext pf3DbContext) : Endpoint<IdSoundCategoryDto, ReadSoundCategoryDto>
public class GetSoundCategoryEndpoint(PyroFetesDbContext pf3DbContext) : Endpoint<IdSoundCategoryDto, ReadSoundCategoryDto>
{
public override void Configure()
{
@@ -15,7 +15,7 @@ public class GetSoundCategoryEndpoint(PF3DbContext pf3DbContext) : Endpoint<IdSo
public override async Task HandleAsync(IdSoundCategoryDto req, CancellationToken ct)
{
var soundCategory = await pf3DbContext.SoundsCategorys
var soundCategory = await pf3DbContext.SoundCategories
.Where(sc => sc.Id == req.Id)
.Select(sc => new ReadSoundCategoryDto
{