query only returning one result
Hey, I am pretty certain I am 开发者_运维知识库doing something incorrectly with my lambda expression and that is making it so that I only return a single result. If there is nothing wrong with my query (it has the ability to return multiple results), then I must have an error elsewhere and I should be able to find it. If my results should return more than one result for the third part of the or, only one is being returned. Am I doing something wrong here?
var proQuery = from a in solutionContext.Products
where a.ID == solutionID ||
(a.ParentID == solutionID && a.Versions.All(c => c.VersionNumber == activeNumber)) ||
(a.Product2.ParentID == solutionID &&
a.Versions.All(c => c.VersionNumber == activeNumber))
select a;
If there is anymore information you need, I would be happy to help.
There isn't really enough here for us to go on, but are you sure that the Alls are correct and shouldn't be Anys? Absent additional information, that's one thing to look at.
加载中,请稍侯......
精彩评论