1
我要寻找一个版本包含automapper DLL的“跳过”配置选项,在下面的链接详细说明:Automapper“跳过”配置选项
我已经下载了两个版本:从GitHub 1.1 & 2.0,但找不到此功能。
Automapper: Ignore on condition of
我要寻找一个版本包含automapper DLL的“跳过”配置选项,在下面的链接详细说明:Automapper“跳过”配置选项
我已经下载了两个版本:从GitHub 1.1 & 2.0,但找不到此功能。
Automapper: Ignore on condition of
现在有一个条件选项:
CreateMap<Source, Dest>()
.ForMember(dest => dest.SomeValue, opt => opt.Condition(src => src.Bool));
这是非常有用的。谢谢。 – rhk98
我试过使用它,它似乎不允许多个实例。 – Eman
多个实例?如果您有一个复杂的情况,只需在条件中指明它。 opt => opt.Condition(src => src.Foo ||(src.Bar && src.Bax)) –