Beispiel #1
0
        public async Task <IActionResult> Add([FromBody] AddBlockCycleRequest request)
        {
            _logger.LogInformation("Calling Add from BlockCycleController with request : {@0}", request);
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var requestXml = _xmlHelper.ConvertToXml(request);

            if (!await _blockCycleAppService.AddBlockCycleAsync(requestXml))
            {
                return(NotFound());
            }
            return(Ok());
        }
Beispiel #2
0
        public async Task <IActionResult> SaveInspection([FromBody] InspectionRequest inspectionRequest)
        {
            _logger.LogInformation("Calling SaveInspection from InspectionController with request : {@0}", inspectionRequest);
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var inspection = _xmlHelper.ConvertToXml(inspectionRequest);

            if (!await _inspectionAppService.SaveInspectionAsync(inspection))
            {
                return(NotFound());
            }
            return(Ok());
        }