ExamAbsentReplaceMapper.cs 548 B

12345678910111213
  1. using Furion.JsonSerialization;
  2. using YBEE.EQM.Core;
  3. namespace YBEE.EQM.Application;
  4. public class ExamAbsentReplaceMapper : IRegister
  5. {
  6. public void Register(TypeAdapterConfig config)
  7. {
  8. config.ForType<ExamAbsentReplace, ExamAbsentReplaceOutput>().Map(d => d.AbsentCourseList, s => JSON.Deserialize<List<CourseMiniOutput>>(s.AbsentCourses, null));
  9. config.ForType<ExamAbsentReplace, ExamAbsentReplaceFullOutput>().Map(d => d.AbsentCourseList, s => JSON.Deserialize<List<CourseMiniOutput>>(s.AbsentCourses, null));
  10. }
  11. }