When I do an NPoco fetch
var products = db.Fetch<dynamic>(sql).ToArray();
and then try to map it with AutoMapper
Mapper.Map<Product[]>(loc)
The resulting Product
does not have any of the expected values even though
sql
, the NPoco.PocoExpando
instances in products
, and the Product
class, and they all match.Product
are public.The AutoMapper documentation suggests that I'm doing everything correctly. Is this a bug or am I missing something?
In my call to Mapper.Initialize
I set IMapperConfigurationExpression.CreateMissingTypeMaps
to true. It seems that doing this interferes with the dynamic mapping.