using F9WebAiTest.Application.Dtos.SYS.Departments; using F9WebAiTest.Application.Interfaces.Repositories.SYS.Departments; using MediatR; namespace F9WebAiTest.Application.CQRS.SYS.Departments.Queries; public record GetDepartmentAllQuery() : IRequest>; public class GetDepartmentAllQueryHandler(IDepartmentReadRepository departmentReadRepository) : IRequestHandler> { public async Task> Handle(GetDepartmentAllQuery query, CancellationToken ct) => await departmentReadRepository.GetAllAsync(); }