namespace Brizco.Repository.Handlers.ShiftPlans; public class GetShiftPlanQueryHandler(IRepositoryWrapper repositoryWrapper) : IRequestHandler { public async Task Handle(GetShiftPlanQuery request, CancellationToken cancellationToken) { var shiftPlan = await repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.Id == request.Id) .Select(ShiftPlanMapper.ProjectToLDto) .FirstOrDefaultAsync(cancellationToken); if (shiftPlan == null) throw new AppException("ShiftPlan not found", ApiResultStatusCode.NotFound); return shiftPlan; } }