Blame view

antis-ncc-net-core/ClassLibrary1/题库信息/Mapper/TbQuestionMapper.cs 554 Bytes
4aba9b59   wwk   1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  using NCC.Common.Helper;
  using NCC.Common.Model;
  using NCC.Education.Entitys.Dto.TbQuestion;
  using Mapster;
  using System.Collections.Generic;
  
  namespace NCC.Education.Entitys.Mapper.TbQuestion
  {
  	public class Mapper : IRegister
  	{
  		public void Register(TypeAdapterConfig config)
  		{
  			config.ForType<TbQuestionCrInput, TbQuestionEntity>()
  				.Map(dest => dest.Img, src => src.img.ToJson())
  			;
  			config.ForType<TbQuestionEntity, TbQuestionInfoOutput>()
  				.Map(dest => dest.img, src => src.Img.ToObject<List<FileControlsModel>>())
  			;
  		}
  	}
  }