Ejemplo n.º 1
0
        public async Task <IActionResult> AddQuestions(int id, [FromBody] QuestionUpdateViewModel questionsVm)
        {
            if (ModelState.IsValid)
            {
                var questionsDto = _mapper.Map <QuestionUpdateDto>(questionsVm);
                await _propertyService.AddNewQuestions(id, questionsDto);

                return(Ok());
            }

            return(BadRequest());
        }