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<Db.Question, Models.MultiLanguage>().ForMember(dest => dest.TypeText, opt => opt.MapFrom(src => src.QuestionType.TypeText)); CreateMap<Models.QuestionCategory, Db.QuestionCategory>(); CreateMap<Db.QuestionCategory, Models.MultiLanQuestionCategory>(); CreateMap<Models.Question, Db.Question>(); CreateMap<Db.QuestionsTranslation, Models.QuestionsTranslation>(); CreateMap<Models.QuestionsTranslation, Db.QuestionsTranslation>(); CreateMap<Db.CategoryTranslation, Models.CategoryTranslation>(); CreateMap<Models.CategoryTranslation, Db.CategoryTranslation>(); } } }