예제 #1
0
        public async Task <string> Handle(CreateDeploymentRequest request, CancellationToken cancellationToken)
        {
            var entity = _mapper.Map <DeploymentEntity>(request.DeploymentDto);

            var id = await _deploymentRepository.CreateDeploymentAsync(entity);

            if (id == null)
            {
                throw new StatusException(StatusCodes.Status500InternalServerError,
                                          "Could not create the requested deployment.");
            }

            return(id);
        }