DamageAssessment_Backend/DamageAssesmentApi/DamageAssesment.Api.Questions/Profiles/QuestionProfile.cs

19 lines
707 B
C#
Raw Normal View History

2023-08-15 22:52:30 -05:00
using AutoMapper;
namespace DamageAssesment.Api.Questions.Profiles
{
public class QuestionProfile : AutoMapper.Profile
{
public QuestionProfile()
{
CreateMap<Db.Question, Models.Question>().ForMember(dest => dest.TypeText,
opt => opt.MapFrom(src => src.QuestionType.TypeText));
CreateMap<Models.QuestionCategory, Db.QuestionCategory>();
CreateMap<Db.QuestionCategory, Models.QuestionCategory>();
CreateMap<Models.Question, Db.Question>();
CreateMap<Db.QuestionsTranslation, Models.QuestionsTranslation>();
CreateMap<Models.QuestionsTranslation, Db.QuestionsTranslation>();
}
}
}