Esempio n. 1
0
        /// <inheritdoc />
        public async Task <OneOf <MaterialManufacturingResponseModel, EntityNotFound> > GetMaterialManufacturingByIdAsync(long id, CancellationToken cancellationToken)
        {
            var smartContract = await _blockchainRepository
                                .GetDeployedSmartContractByIdAsync(id, cancellationToken);

            if (smartContract is null)
            {
                return(new EntityNotFound {
                    Message = $"The deployed smart-contract with ID: {id} not found."
                });
            }

            // TODO need to add getting from blockchain network.
            return(new MaterialManufacturingResponseModel(id, ""));
        }