namespace Brizco.Repository.Handlers.Sections; public class GetSectionQueryHandler(IRepositoryWrapper repositoryWrapper) : IRequestHandler { public async Task Handle(GetSectionQuery request, CancellationToken cancellationToken) { var shift = await repositoryWrapper.SetRepository
() .TableNoTracking .Where(s => s.Id == request.Id) .Select(SectionMapper.ProjectToLDto) .FirstOrDefaultAsync(cancellationToken); if (shift == null) throw new AppException("Section not found", ApiResultStatusCode.NotFound); return shift; } }