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

23 lines
1.0 KiB
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));
2023-09-08 14:40:06 -05:00
CreateMap<Db.Question, Models.MultiLanQuestion>().ForMember(dest => dest.TypeText,
opt => opt.MapFrom(src => src.QuestionType.TypeText));
2023-08-15 22:52:30 -05:00
CreateMap<Models.QuestionCategory, Db.QuestionCategory>();
2023-09-08 14:40:06 -05:00
CreateMap<Db.QuestionCategory, Models.MultiLanQuestionCategory>();
2023-08-15 22:52:30 -05:00
CreateMap<Models.Question, Db.Question>();
CreateMap<Db.QuestionsTranslation, Models.QuestionsTranslation>();
CreateMap<Models.QuestionsTranslation, Db.QuestionsTranslation>();
2023-09-08 14:40:06 -05:00
CreateMap<Db.CategoryTranslation, Models.CategoryTranslation>();
CreateMap<Models.CategoryTranslation, Db.CategoryTranslation>();
2023-08-15 22:52:30 -05:00
}
}
}