Skip to content

IUserRepository

Namespace: SlottyMedia.Database.Repository.UserRepo

Interface for the User Repository.

public interface IUserRepository : SlottyMedia.Database.Repository.IDatabaseRepository`1[[SlottyMedia.Database.Daos.UserDao, SlottyMedia.Database, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Implements IDatabaseRepository<UserDao>

Methods

GetUserByUsername(String)

Gets a user by their username.

Task<UserDao> GetUserByUsername(string username)

Parameters

username String
The username of the user.

Returns

Task<UserDao>
A task that represents the asynchronous operation. The task result contains the user.

Exceptions

DatabaseMissingItemException
Thrown when the entity is not found in the database.

GeneralDatabaseException
Thrown when an unexpected error occurs.

GetUserByEmail(String)

Gets a user by their email.

Task<UserDao> GetUserByEmail(string email)

Parameters

email String
The email of the user.

Returns

Task<UserDao>
A task that represents the asynchronous operation. The task result contains the user.

Exceptions

DatabaseMissingItemException
Thrown when the entity is not found in the database.

GeneralDatabaseException
Thrown when an unexpected error occurs.