Пример #1
0
        public async Task <ActionResult <Inspection> > CreateInspectionAsync([FromBody] Inspection inspection)
        {
            // Create inspection
            inspection = await _inspectionService.AddAsync(inspection, HttpContext.RequestAborted).ConfigureAwait(false);

            if (inspection == null)
            {
                return(Conflict());
            }

            return(CreatedAtAction(nameof(GetInspectionByIdAsync), new { id = inspection.Id }, inspection));
        }