From c8ed747aa376de01f9ea71fd7292be31d13773ba Mon Sep 17 00:00:00 2001 From: honzapatCZ Date: Sun, 12 Apr 2026 17:51:34 +0200 Subject: [PATCH] fixup some source stuff --- AutoMapProperty/AutoMapProperty.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AutoMapProperty/AutoMapProperty.cs b/AutoMapProperty/AutoMapProperty.cs index 60bcd8c..f2247f0 100644 --- a/AutoMapProperty/AutoMapProperty.cs +++ b/AutoMapProperty/AutoMapProperty.cs @@ -552,7 +552,7 @@ namespace AutoMapProperty } else { - sb.Append(@".Select(x => (").Append(GetFullString(concreteToType)).Append(@")x)"); + sb.Append(@".Select(x => new ").Append(GetFullString(concreteToType)).Append(@"().ApplyFrom(providers, x))"); sb.Append(nullable ? "?" : ""); } } @@ -663,7 +663,7 @@ namespace AutoMapProperty if (isArray) { - sb.Append(Key).Append(".Any(); source."); + sb.Append(Key).Append("?.Any(); source."); } sb.Append(Key).Append(@" =");