Files
taxbaik/TaxBaik.Domain/Interfaces/IClientRepository.cs

18 lines
849 B
C#

namespace TaxBaik.Domain.Interfaces;
using TaxBaik.Domain.Entities;
public interface IClientRepository
{
Task<(IEnumerable<Client> Items, int Total)> GetPagedAsync(
int page, int pageSize, string? status = null, string? search = null,
CancellationToken ct = default);
Task<Client?> GetByIdAsync(int id, CancellationToken ct = default);
Task<Client?> GetByEmailAsync(string email, CancellationToken ct = default);
Task<Client?> GetByPhoneAsync(string phone, CancellationToken ct = default);
Task<int> CountByCreatedAtRangeAsync(DateTime startDateUtc, DateTime endDateUtc, CancellationToken ct = default);
Task<int> CreateAsync(Client client, CancellationToken ct = default);
Task UpdateAsync(Client client, CancellationToken ct = default);
Task DeleteAsync(int id, CancellationToken ct = default);
}