DB.QueryAsync<PeripheralDeviceProductInstanceMapping>()
.Include(i => i.ProductInstance).Include(i => i.ProductInstance.Product)
.ProjectTo(i => i.ProductInstance, cancellationToken);
DB.QueryAsync<PeripheralDeviceProductInstanceMapping>()
.Include(i => i.ProductInstance)
.ProjectTo(i => i.ProductInstance, cancellationToken);
This exception was originally thrown at this call stack:
System.Convert.ChangeType(object, System.Type, System.IFormatProvider)
NPoco.MappingHelper.GetConverter.AnonymousMethod__7(object)
NPoco.RowMappers.PropertyMapper.MapValue(NPoco.RowMappers.GroupResult<NPoco.RowMappers.PosName>, object[], System.Func<object, object>, object, NPoco.PocoColumn, object)
NPoco.RowMappers.PropertyMapper.BuildMapPlans.AnonymousMethod__3(System.Data.Common.DbDataReader, object[], object)
NPoco.RowMappers.PropertyMapper.BuildMapPlans.AnonymousMethod__2(System.Data.Common.DbDataReader, object[], object)
NPoco.RowMappers.PropertyMapper.BuildMapPlan.AnonymousMethod__1(System.Data.Common.DbDataReader, object[], object)
NPoco.RowMappers.PropertyMapper.Map(System.Data.Common.DbDataReader, NPoco.RowMappers.RowMapperContext)
NPoco.MappingFactory.Map(System.Data.Common.DbDataReader, object)
NPoco.Database.QueryAsync<T>(T, System.Linq.Expressions.Expression<System.Func<T, System.Collections.IList>>, System.Func<T, object[]>, NPoco.Sql, NPoco.PocoData, System.Threading.CancellationToken)
NPoco.Database.QueryAsync<T>(T, System.Linq.Expressions.Expression<System.Func<T, System.Collections.IList>>, System.Func<T, object[]>, NPoco.Sql, NPoco.PocoData, System.Threading.CancellationToken)
...
[Call Stack Truncated]
It looks like a once fixed problem (#218) is back in later versions:
or also the minimal example:
throws a
System.InvalidCastException: 'Object must implement IConvertible.'exception at