using System.Collections.Immutable;
using Connected.Net;
using Connected.Remote;
using Connected.ServiceModel;
using Connected.Services;
namespace Connected.Common.Types.TaxRates;
///
/// This is the client implementation of the .
///
internal class TaxRateService : EntityService, ITaxRateService, IRemoteService
{
public TaxRateService(IHttpService http)
{
Http = http;
}
private IHttpService Http { get; }
public async Task Delete(PrimaryKeyArgs e)
{
await Http.Post("http://localhost:5063/management/commonTypes/taxRates/delete", e);
}
public async Task Insert(InsertTaxRateArgs e)
{
return await Http.Post("http://localhost:5063/management/commonTypes/taxRates/insert", e);
}
public async Task?> Query(PrimaryKeyListArgs e)
{
return (await Http.Post?>("http://localhost:5063/management/commonTypes/taxRates/select", e)).ToImmutableList();
}
public async Task?> Query(QueryArgs? args)
{
return (await Http.Post?>("http://localhost:5063/management/commonTypes/taxRates/query", args ?? QueryArgs.NoPaging)).ToImmutableList();
}
public async Task Select(PrimaryKeyArgs e)
{
return await Http.Post("http://localhost:5063/management/commonTypes/taxRates/select", e);
}
public async Task Select(TaxRateArgs e)
{
return await Http.Post("http://localhost:5063/management/commonTypes/taxRates/select", e);
}
public async Task Update(UpdateTaxRateArgs e)
{
await Http.Post("http://localhost:5063/management/commonTypes/taxRates/update", e);
}
}