21 lines
508 B
C#
21 lines
508 B
C#
using AutoMapper;
|
|
using Entities.Contracts;
|
|
using Entities.DTO;
|
|
using TechHelper.Client.Exam;
|
|
|
|
namespace TechHelper.Context
|
|
{
|
|
public class AutoMapperProFile : Profile
|
|
{
|
|
public AutoMapperProFile()
|
|
{
|
|
CreateMap<QuestionEx, QuestionDto>()
|
|
.ForMember(d => d.Options, o => o.MapFrom(s => string.Join(Environment.NewLine, s.Options.Select(op => op.Text))));
|
|
CreateMap<ExamQuestionEx, ExamQuestionDto>();
|
|
CreateMap<ExamEx, ExamDto>();
|
|
CreateMap<AssignmentCheckData, Submission>();
|
|
}
|
|
}
|
|
|
|
}
|