コード例 #1
0
        public async Task <BusinessLegal> UpdateBusinessLegalsAsync(
            [GraphQLType(typeof(UpdateBusinessLegalsInputType))][GraphQLName("input")]
            UpdateBusinessLegalCommand input, [Service] ISheaftMediatr mediatr,
            BusinessLegalsByIdBatchDataLoader legalsDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await legalsDataLoader.LoadAsync(input.LegalId, token));
        }
コード例 #2
0
        public async Task <BusinessLegal> CreateBusinessLegalsAsync(
            [GraphQLType(typeof(CreateBusinessLegalInputType))][GraphQLName("input")]
            CreateBusinessLegalCommand input, [Service] ISheaftMediatr mediatr,
            BusinessLegalsByIdBatchDataLoader legalsDataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <CreateBusinessLegalCommand, Guid>(mediatr, input, token);

            return(await legalsDataLoader.LoadAsync(result, token));
        }