using GB5Shared.DTO.Framework.Login; using GB5Shared.QueryExecutor; using PERMDAL.DTOs; using PERMDAL.Interfaces; using PERMDAL.QueryBuilders; namespace PERMDAL.Implementations; public class BellCurveDAL : IBellCurveDAL { private readonly IQueryExecutor _qe; public BellCurveDAL(IQueryExecutor queryExecutor) => _qe = queryExecutor; public async Task> GetBellCurveBandsAsync( int appraisalPlanId, int ouId, LoginDTO login, CancellationToken ct) => await _qe.QueryAsync(login, BellCurveQB.GET_BELL_CURVE, new { AppraisalPlanId = appraisalPlanId, OUID = ouId, TenantId = login.ClientId }, cancellationToken: ct) .ConfigureAwait(false) ?? Enumerable.Empty(); public async Task GetAppraisalPlanNameAsync(int appraisalPlanId, LoginDTO login, CancellationToken ct) => await _qe.ExecuteScalarAsync(login, BellCurveQB.GET_PLAN_NAME, new { AppraisalPlanId = appraisalPlanId, TenantId = login.ClientId }, cancellationToken: ct) .ConfigureAwait(false); }