Modifs de noms et providers
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user