Open dario-l opened 3 years ago
It turns out that for simple clr types like int, int[], List<int>
works but doesn't work when it is custom object type, for eg.: ReferenceCollection.
public class ReferenceCollection
{
public List<Item> Items { get; private init; } = new();
public class Item
{
public int Id { get; private init; }
public string Name { get; private init; }
public static Item Create(int id, string name)
{
return new()
{
Id = id,
Name = name
};
}
}
}
"NPoco.SqlServer" Version="5.1.2"
I have custom mapper for complex object. Mapper serializes object to JSON and vice-versa. Mapper works (serialization and deserialization returns proper values from/to db).
Exception is odd:
Mapper:
One more thing. Method
GetFromDbConverter(MemberInfo destMemberInfo, Type sourceType)
is never invoked for member typeReferenceCollection
. 😞