14 lines
558 B
C#
14 lines
558 B
C#
using F9WebAiTest.Application.Dtos.SYS.RBAC.Roles;
|
|
using F9WebAiTest.Application.Interfaces.Repositories.SYS.RBAC.Roles;
|
|
using MediatR;
|
|
|
|
namespace F9WebAiTest.Application.CQRS.SYS.RBAC.Roles.Queries;
|
|
|
|
public record GetRoleAllQuery() : IRequest<List<RoleReadDto_View>>;
|
|
|
|
public class GetRoleAllQueryHandler(IRoleReadRepository roleReadRepository) : IRequestHandler<GetRoleAllQuery, List<RoleReadDto_View>>
|
|
{
|
|
public async Task<List<RoleReadDto_View>> Handle(GetRoleAllQuery query, CancellationToken ct)
|
|
=> await roleReadRepository.GetAllAsync();
|
|
}
|