finalisation des endpoints
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
using FastEndpoints;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PF3.DTO.SoundCategory.Response;
|
||||
using PyroFetes.DTO.SoundCategory.Response;
|
||||
|
||||
namespace PF3.Endpoints.SoundCategory;
|
||||
namespace PyroFetes.Endpoints.SoundCategory;
|
||||
|
||||
public class GetAllSoundCategorysEndpoint(PF3DbContext pf3DbContext) : EndpointWithoutRequest<List<ReadSoundCategoryDto>>
|
||||
public class GetAllSoundCategorysEndpoint(PyroFetesDbContext pf3DbContext) : EndpointWithoutRequest<List<ReadSoundCategoryDto>>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
@@ -14,7 +14,7 @@ public class GetAllSoundCategorysEndpoint(PF3DbContext pf3DbContext) : EndpointW
|
||||
|
||||
public override async Task HandleAsync(CancellationToken ct)
|
||||
{
|
||||
var soundCategorys = await pf3DbContext.SoundsCategorys.ToListAsync(ct);
|
||||
var soundCategorys = await pf3DbContext.SoundCategories.ToListAsync(ct);
|
||||
|
||||
var result = soundCategorys.Select(sC => new ReadSoundCategoryDto
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user