コード例 #1
0
        public async Task <Result <Good> > CreateGood(CreateGood good)
        {
            var resultFromClient = await goodsClient.CreateGoodAsync(GoodConverter.ToDto(good));

            return(new Result <Good>
            {
                IsSuccess = resultFromClient.IsSuccess,
                Message = resultFromClient.Message,
                Value = resultFromClient.IsSuccess
                    ? GoodConverter.FromDto(resultFromClient.Value)
                    : null
            });
        }