public async Task <IEnumerable <AttrDescr> > GetSessionsAsync(EntityBase attendee, [ScopedService] ApplicationDbContext dbContext,
                                                                          AttrDescrByIdDataLoader attrDescrByIdDataLoader, CancellationToken cancellationToken)
            {
                var attrDescrIds = await dbContext.AttrDescrs
                                   .Where(a => a.Id == attendee.Id)
                                   .Select(a => a.Id)
                                   .ToArrayAsync(cancellationToken: cancellationToken);

                return(await attrDescrByIdDataLoader.LoadAsync(attrDescrIds, cancellationToken));
            }
Beispiel #2
0
 public Task <Model.AttrDescr> GetAttrDescrAsync(
     [ID(nameof(Model.Attr))] Guid id,
     AttrDescrByIdDataLoader dataLoader,
     CancellationToken cancellationToken) =>
 dataLoader.LoadAsync(id, cancellationToken);