I have this linq query and I want to get a dictionary, the value is a collection of entities, and I want to use an include for this list.
var keys = (from e in ctx.Events
where (e.DeletedFlag == null || e.DeletedFlag == false) &&
e.ModuleID == moduleId &&
e.ParentID == null &&
e.EventType == Core.Enum.EventType.Menu
select new {
Key = e,
Values = (from v in ctx.Events
where (v.DeletedFlag == null || v.DeletedFlag == false) &&
v.ModuleID == moduleId &&
v.ParentID == e.PublicationID
select v).Include(v => v.Document).Include(v => v.EventTAF).Include(v => v.Appointment)
}).ToList();
When I execute this query I get an error saying that linq does not recognize Include method.
Any ideas ?