Question regarding querying the contents of a collection navigation property from the DbContext book, page 39. I was playing around with the query for example 2-27 In-memory query of a navigation property. I wanted to see if it could all be done in one go. So I tried......
var query = from d in context.Destinations
let temp1 = context.Destinations.Where(a => a.Name == "Grand Canyon").Select(a => a)
let temp2 = temp1.Single()
let temp3 = context.Entry(temp2).Collection(b => b.Lodgings).Query()
from x in temp3
where x.MilesFromNearestAirport <= 10
TargetParameterCountException, parameter count mismatch. My first question is, what is causing the exception and second, would it even be possible to do this all in one go?