DotBased/DotBased.AspNet.Authority/Repositories/IUserRepository.cs

16 lines
1.2 KiB
C#
Raw Normal View History

2024-12-25 22:50:04 +01:00
namespace DotBased.AspNet.Authority.Repositories;
2024-12-21 15:30:17 +01:00
2024-12-26 20:01:57 +01:00
public interface IUserRepository<TUser> where TUser : class
2024-12-21 15:30:17 +01:00
{
2025-01-04 00:52:04 +01:00
public Task<TUser?> GetUserByIdAsync(string id, CancellationToken? cancellationToken = null);
public Task<string> GetUserIdAsync(TUser user, CancellationToken? cancellationToken = null);
public Task<Tuple<List<TUser>?, int>> GetUsersAsync(string query, int maxResults = 20, int offset = 0, CancellationToken? cancellationToken = null);
public Task<TUser?> GetUserByEmailAsync(string email, CancellationToken? cancellationToken = null);
public Task SetVersionAsync(TUser user, long version, CancellationToken? cancellationToken = null);
public Task<long> GetVersionAsync(TUser user, CancellationToken? cancellationToken = null);
public Task SetSecurityVersionAsync(TUser user, long version, CancellationToken? cancellationToken = null);
public Task<long> GetSecurityVersionAsync(TUser user, CancellationToken? cancellationToken = null);
public Task<TUser?> CreateUserAsync(TUser user, CancellationToken? cancellationToken = null);
public Task<TUser?> UpdateUserAsync(TUser user, CancellationToken? cancellationToken = null);
public Task<bool> DeleteUserAsync(TUser user, CancellationToken? cancellationToken = null);
2024-12-21 15:30:17 +01:00
}