customer type affiché

This commit is contained in:
2026-06-10 21:43:38 +02:00
parent a88ce4cc7e
commit 35c99928ad
2 changed files with 4 additions and 1 deletions
@@ -14,10 +14,11 @@ public class GetAllCustomerEndpoint(PyroFetesDbContext pyroFetesDbContext) : End
public override async Task HandleAsync(CancellationToken ct)
{
List<GetCustomerDto> customer= await pyroFetesDbContext.Customers.Select(x => new GetCustomerDto()
List<GetCustomerDto> customer= await pyroFetesDbContext.Customers.Include(x => x.CustomerType).Select(x => new GetCustomerDto()
{
Id = x.Id,
Note = x.Note,
CustomerType = x.CustomerType.Label,
}).ToListAsync(ct);
await Send.OkAsync(customer, ct);