30 lines
906 B
C#
30 lines
906 B
C#
|
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);
|
||
|
}
|