i'm sorry guys it's stupid commit...
This commit is contained in:
parent
77cfacb95e
commit
4b4739ce89
13 changed files with 174 additions and 1 deletions
20
SurveyBackend/SurveyBackend.API/Mappers/AnswerMapper.cs
Normal file
20
SurveyBackend/SurveyBackend.API/Mappers/AnswerMapper.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using SurveyBackend.DTOs.Answer;
|
||||
using SurveyLib.Core.Models;
|
||||
|
||||
namespace SurveyBackend.Mappers;
|
||||
|
||||
public static class AnswerMapper
|
||||
{
|
||||
public static Answer CreateDtoToModel(AnswerCreateDto dto) => new Answer
|
||||
{
|
||||
QuestionId = dto.QuestionId,
|
||||
AnswerText = dto.AnswerText,
|
||||
};
|
||||
|
||||
public static AnswerOutputDto ModelToOutputDto(Answer model) => new AnswerOutputDto
|
||||
{
|
||||
QuestionId = model.QuestionId,
|
||||
AnswerText = model.AnswerText,
|
||||
CompletionId = model.CompletionId,
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue