Hi. In version 10.0.11, "IgnoreIf" doesn't work as it did in version 7... My mapper is written like this:
.Map(ask => ask.BoxPost, crm => crm.GetValue<AddressEntity, string?>(nameof(AddressEntity.BoxPost)))
.IgnoreIf((d, ask) => !d.ContainsKey<AddressEntity>(nameof(AddressEntity.BoxPost)), nameof(AddressEntity.BoxPost))
previously, in version 7, the following mapper code was generated:
.If (
.Call ReForm.Ism.Core.Serialization.Extensions.JsonObjectExtension.ContainsKey(
$var1,
"BoxPost")
) {
.Block() {
$result.BoxPost = .Invoke (.Lambda #Lambda2<System.Func`3[System.String,System.Nullable`1[System.Decimal],System.Nullable`1[System.Decimal]]>)(
.Call ReForm.Ism.Core.Serialization.Extensions.JsonObjectExtension.GetValue(
$var1,
"BoxPost"),
$result.BoxPost)
}
} .Else {
.Default(System.Void)
};
and now I get this:
BoxPost = .Invoke (.Lambda #Lambda2<System.Func`2[System.String,System.Nullable`1[System.Decimal]]>)(.Call ReForm.Ism.Core.Serialization.Extensions.JsonObjectExtension.GetValue(
$var1,
"BoxPost")),
It turns out that the presence of "IgnoreIf" does not change anything.
Hi. In version 10.0.11, "IgnoreIf" doesn't work as it did in version 7... My mapper is written like this:
previously, in version 7, the following mapper code was generated:
and now I get this:
It turns out that the presence of "IgnoreIf" does not change anything.