I have 3 classes. WorkoutSession, WorkoutSessionExercise and Exercise.
I would like to return the WorkoutSession with its list of WorkoutSession with the Exercise related. WorkoutSession has many WorkoutSessionExercise, and these one has only a single 1 to 1 relationship with Exercise.
var query = from workoutSession in DatabaseContext.SetOwnable<WorkoutSession>()
from workoutSessionExercises in workoutSession.WorkoutSessionExercises
from exerciseInfo in workoutSessionExercises.Exercise
where workoutSession.Id == id
select workoutSession;
The last FROM has the error : The type argument cannot be inferred from the query.
How can I load this three level deep objects with Linq To Entity?