galaeth-draft/Galaeth.Core/RepositoryInterfaces/IUserRepository.cs

30 lines
906 B
C#
Raw Normal View History

2024-11-17 10:31:01 +01:00
using Galaeth.Core.Entities;
namespace Galaeth.Core.RepositoryInterfaces;
/// <summary>
/// <see cref="User"/> Repository.
/// </summary>
public interface IUserRepository : IGenericRepository<User, Guid>
{
/// <summary>
/// Return a count of all users.
/// </summary>
/// <returns>A count of users in the table.</returns>
Task<long> CountUsersAsync();
/// <summary>
/// Find a user by their username.
/// </summary>
/// <param name="username">The username to search for.</param>
/// <returns>The user entity if found, or null.</returns>
Task<User> FindByUsername(string username);
/// <summary>
/// Find a user by their email address.
/// </summary>
/// <param name="emailAddress">The email address to search for.</param>
/// <returns>The user entity if found, or null.</returns>
Task<User> FindByEmailAddress(string emailAddress);
}