mappers to new naming
This commit is contained in:
parent
cc2d98c710
commit
2cb7fdbfb7
2 changed files with 7 additions and 7 deletions
|
|
@ -17,7 +17,7 @@ public static class QuestionMapper
|
|||
/// <param name="surveyId"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BadRequestException"></exception>
|
||||
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
|
|||
/// </summary>
|
||||
/// <param name="question"></param>
|
||||
/// <returns></returns>
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public static class SurveyMapper
|
|||
/// <param name="dto"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
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
|
|||
/// </summary>
|
||||
/// <param name="survey"></param>
|
||||
/// <returns></returns>
|
||||
public static OutputSurveyDto ModelToOutputDto(Survey survey)
|
||||
public static SurveyOutputDto ModelToOutputDto(Survey survey)
|
||||
{
|
||||
return new OutputSurveyDto
|
||||
return new SurveyOutputDto
|
||||
{
|
||||
Id = survey.Id,
|
||||
Title = survey.Title,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue