31 lines
924 B
C#
31 lines
924 B
C#
using UserManagement.Application.Dtos.Incomming;
|
|
using UserManagement.Application.Dtos.Outgoing;
|
|
using UserManagement.Domain.Entities;
|
|
|
|
namespace UserManagement.Application.Interfaces
|
|
{
|
|
public interface IUserService
|
|
{
|
|
// CREATE
|
|
Task<User?> AddUserAsync(CreatingUserDto creatingUserDto);
|
|
|
|
// READ ALL
|
|
Task<IEnumerable<ReadingUserDto>> GetUsersAsync(bool includeRoles = true);
|
|
|
|
// READ BY ID
|
|
Task<ReadingUserDto> GetByIdAsync(int id, bool includeRoles = true);
|
|
|
|
// READ BY USERNAME
|
|
Task<ReadingUserDto> GetByUsernameAsync(string username, bool includeRoles = true);
|
|
|
|
// READ BY ROLE
|
|
Task<IEnumerable<ReadingUserDto>> GetByRoleAsync(string role);
|
|
|
|
// UPDATE
|
|
Task<bool> UpdateUserAsync(UpdatingUserDto updatingUserDto);
|
|
|
|
// DELETE
|
|
Task<bool> DeleteUserAsync(int id);
|
|
}
|
|
}
|