public async Task <PreflightConcepts> GetConceptsByIdAsync(Guid conceptId) { using (var cn = new SqlConnection(opts.ConnectionString)) { await cn.OpenAsync(); var grid = await cn.QueryMultipleAsync( ConceptPreflightSql.singleId, new { id = conceptId, user = user.UUID, groups = GroupMembership.From(user), admin = user.IsAdmin }, commandTimeout : opts.DefaultTimeout, commandType : CommandType.StoredProcedure ); return(PreflightReader.ReadConcepts(grid)); } }
public async Task <PreflightConcepts> GetConceptsByUniversalIdsAsync(HashSet <string> conceptUids) { using (var cn = new SqlConnection(opts.ConnectionString)) { await cn.OpenAsync(); var grid = await cn.QueryMultipleAsync( ConceptPreflightSql.manyUIds, new { uids = ResourceUniversalIdTable.From(conceptUids), user = user.UUID, groups = GroupMembership.From(user), admin = user.IsAdmin }, commandTimeout : opts.DefaultTimeout, commandType : CommandType.StoredProcedure ); return(PreflightReader.ReadConcepts(grid)); } }