2024-09-06 10:59:27 +02:00

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);
}
}