public async Task <ActionResult> GetProductionLineAsync(Guid productionLineId)
        {
            var byIdResult = await GetByIdCommandHandler.GetById(productionLineId);

            return(byIdResult.Match(
                       success => Ok(new ProductionLineHto(success.Result)),
                       notFound => this.Problem(ProblemFactory.EntityNotFound(typeof(ProductionLineHto).Name, productionLineId.ToString())),
                       notReachable => this.Problem(ProblemFactory.ServiceUnavailable()),
                       error => this.Problem(ProblemFactory.Exception(error.Exception))));
        }
 public ProductionLineController(
     GetByIdCommandHandler getByIdCommandHandler,
     ShutDownForMaintenanceCommandHandler shutDownForMaintenanceCommandHandler,
     CompleteMaintenanceCommandHandler completeMaintenanceCommandHandler,
     IProblemFactory problemFactory)
 {
     GetByIdCommandHandler = getByIdCommandHandler;
     ShutDownForMaintenanceCommandHandler = shutDownForMaintenanceCommandHandler;
     CompleteMaintenanceCommandHandler    = completeMaintenanceCommandHandler;
     ProblemFactory = problemFactory;
 }