public async Task <PanelDatasetCompilerContext> GetCompilerContextAsync(ConceptDatasetExecutionRequest request) { var conceptRef = new ConceptRef(request.PanelItem.Resource); var hydrator = GetContextHydrator(request.QueryRef, conceptRef); var context = await hydrator(request, conceptRef); return(context); }
async Task <PanelDatasetCompilerContext> ByQueryUIdConceptId(ConceptDatasetExecutionRequest request, ConceptRef conceptRef) { log.LogInformation("Getting ConceptDatasetCompilerContext by QueryUId and ConceptId"); var queryuid = request.QueryRef.UniversalId.ToString(); var conceptid = conceptRef.Id.Value; using (var cn = new SqlConnection(opts.ConnectionString)) { await cn.OpenAsync(); var grid = await cn.QueryMultipleAsync( contextByQueryUIdConceptId, new { queryuid, conceptid, user = user.UUID, groups = GroupMembership.From(user), admin = user.IsAdmin }, commandType : CommandType.StoredProcedure, commandTimeout : opts.DefaultTimeout ); return(ReadContextGrid(request, grid)); } }