ExamCourseMapper.cs 533 B

12345678910111213
  1. using Furion.JsonSerialization;
  2. using YBEE.EQM.Core;
  3. namespace YBEE.EQM.Application;
  4. public class ExamCourseMapper : IRegister
  5. {
  6. public void Register(TypeAdapterConfig config)
  7. {
  8. config.ForType<ExamCourse, ExamCourseLiteOutput>().Map(d => d.ScoreReportConfig, s => JSON.Deserialize<ExamCourseScoreReportConfig>(s.ScoreReportConfig, null));
  9. config.ForType<ExamCourse, ExamCourseOutput>().Map(d => d.ScoreReportConfig, s => JSON.Deserialize<ExamCourseScoreReportConfig>(s.ScoreReportConfig, null));
  10. }
  11. }