Using the include method does not include the children of a collection.
var abuseCaseQuery =
from @event in
context.AbuseEvents.Include("AbuseCase.AbuseCaseStatus.Status")
select new
{
@event.SecurityGroupId,
@event.AbuseCaseId,
@event.AbuseCase.AbuseCaseStatus
}
;
var abuseCases = abuseCaseQuery.ToList();
The abuseCases
List contains all the AbuseCasesStatus
and the StatusId
but the Status
object is null.
edmx:
How can I populate the Status
navigation property?