Esempio n. 1
0
 public Task <Data.GetHttpsResource?> GetGetHttpsResourceAsync(
     Guid id,
     GetHttpsResourceByIdDataLoader byId,
     CancellationToken cancellationToken
     )
 {
     return(byId.LoadAsync(
                id,
                cancellationToken
                ));
 }
        public async Task <Data.GetHttpsResource?> GetParent(
            [Parent] Data.GetHttpsResource getHttpsResource,
            GetHttpsResourceByIdDataLoader byId,
            CancellationToken cancellationToken

            )
        {
            // TODO Why is `?? Guid.Empty` below necessary although `getHttpsResource.ParentId` is not null?
            return(getHttpsResource.ParentId is null
                ? null
                : await byId.LoadAsync(getHttpsResource.ParentId ?? Guid.Empty, cancellationToken) !);
        }