IRoleRepository
Namespace: SlottyMedia.Database.Repository.RoleRepo
Interface for Role Repository, extending the IDatabaseRepository for RoleDao.
public interface IRoleRepository : SlottyMedia.Database.Repository.IDatabaseRepository`1[[SlottyMedia.Database.Daos.RoleDao, SlottyMedia.Database, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
Implements IDatabaseRepository<RoleDao>
Methods
GetRoleIdByName(String)
Retrieves the role ID by the role name.
Task<Guid> GetRoleIdByName(string roleName)
Parameters
roleName String
The name of the role.
Returns
Task<Guid>
A task that represents the asynchronous operation. The task result contains the role ID.
Exceptions
DatabaseMissingItemException
Thrown when the entity is not found in the database.
GeneralDatabaseException
Thrown when an unexpected error occurs.
UpdateElement(RoleDao)
Updates an existing RoleDao element in the repository.
Task UpdateElement(RoleDao element)
Parameters
element RoleDao
The RoleDao element to update.
Returns
Task
A task that represents the asynchronous operation.
DeleteElement(RoleDao)
Deletes a RoleDao entity from the repository.
Task DeleteElement(RoleDao entity)
Parameters
entity RoleDao
The RoleDao entity to delete.
Returns
Task
A task that represents the asynchronous operation.