Modifs de noms et providers

This commit is contained in:
2026-06-07 19:06:45 +02:00
parent 7da7c26a2e
commit af21591669
15 changed files with 60 additions and 16 deletions
@@ -8,18 +8,19 @@ public class GetAllProvidersEndpoint(PyroFetesDbContext pyroFetesDbContext) : En
{
public override void Configure()
{
Get ("/providers");
Get ("/serviceproviders");
AllowAnonymous();
}
public override async Task HandleAsync(CancellationToken ct)
{
List<GetProviderDto> customer= await pyroFetesDbContext.Providers.Select(x => new GetProviderDto()
List<GetProviderDto> provider= await pyroFetesDbContext.ServiceProviders.Select(x => new GetProviderDto()
{
Id = x.Id,
Price = x.Price,
ProviderTypeId = x.ProviderTypeId,
}).ToListAsync(ct);
await Send.OkAsync(customer, ct);
await Send.OkAsync(provider, ct);
}
}