In my EntityFramework I have three associated tables like so:

I’m trying to get the last time a file was used on a job. I have a value for File.Name and I need to get the maximum value for Job.ExecutedOn. I can obtain the File.FileId with a where clause, then in a separate expression get a list of FileHistory.JobId, then finally in a third expression get the maximum of Job.ExecutedOn. It feels very clumsy.
I was hoping for a single expression that accepts a value for File.Name and traverses across the tables to return the maximum value for Job.ExecutedOn. Is this possible? How?
This should do the trick