Hi guys,
var allCategories =
Context.Query<Article>()
.Where(x => x.ProductGroup.Id ==
productGroupId)
.SelectMany(x => x.Categories)
.Distinct()
.ToList();
generates a perfect query, but when it tries to transform the result,
it throws a
InvalidCastException
Message:
Unable to cast object of type 'xxx.Product' to type 'xxx.Category'
Any idea, how I can come around this?
Funny detail Product is a super class of Article, no idea where it got
the idea from to cast it to Product and not to Article.
As far as I can tell I am up to date with the nhcontrib trunk.
--
Jan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---