示例#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
 public Task <Family> GetFamilyAsync(
     [ID(nameof(Family))] int id,
     FamilyByIdDataLoader dataLoader,
     CancellationToken cancellationToken) =>
 dataLoader.LoadAsync(id, cancellationToken);