How does LINQ expression syntax work with Include() for eager loading

I figured it out, thanks for the suggestions anyway.
The solution is to do this (2nd attempt in my question):

var qry = (from a in Actions
join u in Users on a.UserId equals u.UserId    
select a).Include("User")

The reason intellisense didn’t show Include after the query was because I needed the following using:

using System.Data.Entity;

Everything worked fine doing this.

Leave a Comment