All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 4m55s
26 lines
855 B
C#
26 lines
855 B
C#
using Domain.Entities;
|
|
using Domain.Generics;
|
|
using System.Net.Http.Json;
|
|
namespace phronCare.UIBlazor.Services.Sales
|
|
{
|
|
public class CustomerHttpService
|
|
{
|
|
private readonly HttpClient _http;
|
|
public CustomerHttpService(HttpClient http)
|
|
{
|
|
_http = http;
|
|
}
|
|
public async Task<PagedResult<ECustomer>?> SearchCustomersAsync(CustomerSearchParams searchParams)
|
|
{
|
|
var url = $"api/Customer/SearchPaged?" +
|
|
$"name={searchParams.Name}&" +
|
|
$"email={searchParams.Email}&" +
|
|
$"document={searchParams.Document}&" +
|
|
$"page={searchParams.Page}&" +
|
|
$"pageSize={searchParams.PageSize}";
|
|
return await _http.GetFromJsonAsync<PagedResult<ECustomer>>(url);
|
|
}
|
|
}
|
|
|
|
}
|