AutoMapper: What is the difference between MapFrom and ResolveUsing?

后端 未结 5 1898
执笔经年
执笔经年 2020-11-30 07:00

Ignoring the ResolveUsing overloads that take an IValueResolver, and looking only at these 2 methods:

v         


        
5条回答
  •  一个人的身影
    2020-11-30 07:36

    Although in many situations either can be used, based on official documentation there is a difference when it comes to LINQ projections. Detailed explanation can be found here.

    Long story short: use MapFrom whenever possible.

提交回复
热议问题