コード例 #1
0
        public async Task <Family?> GetFamilyAsync(
            FamilyByIdDataLoader familyById,
            CancellationToken cancellationToken)
        {
            if (FamilyTask is null)
            {
                return(null);
            }

            return(await familyById.LoadAsync(FamilyTask.Id, cancellationToken));
        }
コード例 #2
0
ファイル: FamilyQueries.cs プロジェクト: oddhus/husarbeid
 public Task <Family> GetFamilyAsync(
     [ID(nameof(Family))] int id,
     FamilyByIdDataLoader dataLoader,
     CancellationToken cancellationToken) =>
 dataLoader.LoadAsync(id, cancellationToken);