Skip to content

Commit 06eb4e1

Browse files
committed
Fixing EF6 projection tests
1 parent 4b31c4c commit 06eb4e1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

AgileMapper/ObjectPopulation/Enumerables/EnumerableTypeHelper.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,12 @@ public Expression GetEnumerableConversion(Expression instance, bool allowEnumera
161161
return instance.WithToCollectionCall(ElementType);
162162
}
163163

164-
return GetCopyIntoObjectConstruction(instance);
164+
if (HasSetInterface)
165+
{
166+
return GetCopyIntoObjectConstruction(instance);
167+
}
168+
169+
return instance.WithToListLinqCall(ElementType);
165170
}
166171

167172
private static bool ValueIsNotEnumerableInterface(Expression instance)

0 commit comments

Comments
 (0)