以前要在定义中忽略

 Mapper.CreateMap<Source, Destination>()
    .ForMember(dest => dest.SomeValuefff, opt => opt.Ignore());

  

一直在找更方便的方法,今天在一篇博客中发现,如果字段是virtual类型的,那么也会被忽略掉。

特此记录。

相关文章:

  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2021-12-21
  • 2021-07-01
猜你喜欢
  • 2022-12-23
  • 2021-08-07
  • 2021-08-24
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
相关资源
相似解决方案