Files
mws.backend.dotnet/mws.application/Common/Repositories/IUserRepository.cs
T

15 lines
716 B
C#
Raw Normal View History

2026-08-13 23:10:22 +07:00
using Mws.Domain.Users;
namespace Mws.Application.Common.Repositories;
public interface IUserRepository : IRepository<User>
{
Task<User?> GetByIdAsync(Guid id, CancellationToken ct = default);
Task<User?> GetByIdWithRoleAsync(Guid id, CancellationToken ct = default);
Task<User?> GetByUsernameWithRoleAsync(string username, CancellationToken ct = default);
Task<bool> ExistsByUsernameAsync(string username, CancellationToken ct = default);
Task<bool> ExistsByRoleIdAsync(Guid roleId, CancellationToken ct = default);
Task<Guid> GetRoleIdAsync(Guid userId, CancellationToken ct = default);
Task<List<User>> SearchWithRoleAsync(string? term, int? take, CancellationToken ct = default);
}