26 lines
561 B
C#
26 lines
561 B
C#
using UserManagement.Domain.Entities;
|
|
|
|
namespace UserManagement.Infrastructure.Interfaces
|
|
{
|
|
public interface IRoleRepository
|
|
{
|
|
// CREATE
|
|
Task<Role?> AddAsync(Role role);
|
|
|
|
// READ ALL
|
|
Task<IEnumerable<Role>> GetAllAsync();
|
|
|
|
// READ BY ID
|
|
Task<Role?> GetByIdAsync(int id);
|
|
|
|
// READ BY NAME
|
|
Task<Role?> GetByNameAsync(string name);
|
|
|
|
// UPDATE
|
|
Task<bool> UpdateAsync(Role role);
|
|
|
|
// DELETE
|
|
Task<bool> DeleteAsync(Role role);
|
|
}
|
|
}
|