diff --git a/SurveyBackend/SurveyBackend.API/Mappers/QuestionMapper.cs b/SurveyBackend/SurveyBackend.API/Mappers/QuestionMapper.cs index e68b311..bede586 100644 --- a/SurveyBackend/SurveyBackend.API/Mappers/QuestionMapper.cs +++ b/SurveyBackend/SurveyBackend.API/Mappers/QuestionMapper.cs @@ -17,7 +17,7 @@ public static class QuestionMapper /// /// /// - public static QuestionBase QuestionCreationToModel(CreateQuestionDto dto, int surveyId) + public static QuestionBase QuestionCreationToModel(QuestionCreateDto dto, int surveyId) { return dto.QuestionType.ToLower() switch { @@ -47,10 +47,10 @@ public static class QuestionMapper /// /// /// - public static OutputQuestionDto ModelToQuestionDto(QuestionBase question) + public static QuestionOutputDto ModelToQuestionDto(QuestionBase question) { var withAnswerVariants = question.GetType() != typeof(TextQuestion); - return new OutputQuestionDto + return new QuestionOutputDto { Id = question.Id, SurveyId = question.SurveyId, diff --git a/SurveyBackend/SurveyBackend.API/Mappers/SurveyMapper.cs b/SurveyBackend/SurveyBackend.API/Mappers/SurveyMapper.cs index 55d90b3..be88b9c 100644 --- a/SurveyBackend/SurveyBackend.API/Mappers/SurveyMapper.cs +++ b/SurveyBackend/SurveyBackend.API/Mappers/SurveyMapper.cs @@ -14,7 +14,7 @@ public static class SurveyMapper /// /// /// - public static Survey CreateDtoToModel(CreateSurveyDto dto, int userId) + public static Survey CreateDtoToModel(SurveyCreateDto dto, int userId) { return new Survey { @@ -24,7 +24,7 @@ public static class SurveyMapper }; } - public static Survey UpdateDtoToModel(UpdateSurveyDto dto, int userId, int surveyId) => new Survey + public static Survey UpdateDtoToModel(SurveyUpdateDto dto, int userId, int surveyId) => new Survey { Id = surveyId, Title = dto.Title, @@ -37,9 +37,9 @@ public static class SurveyMapper /// /// /// - public static OutputSurveyDto ModelToOutputDto(Survey survey) + public static SurveyOutputDto ModelToOutputDto(Survey survey) { - return new OutputSurveyDto + return new SurveyOutputDto { Id = survey.Id, Title = survey.Title,