Пример #1
0
        public async Task <IActionResult> AddAsync([FromBody] AssessmentAddOrUpdateModel assessmentAddOrUpdateModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var assessmentCreateDto = _mapper.Map <AssessmentCreateDto>(assessmentAddOrUpdateModel);
            var statusCode          = await _assessmentService.AddAsync(assessmentCreateDto);

            var response = _assessmentResponseComposer.ComposeForCreate(statusCode, assessmentCreateDto);

            return(response);
        }