I have the following relationship between 3 tables
grandparent: Environment
parent: Organization
child: Dataset
I would like to select all Datasets from the organization where OrganizationName == org and the environment where EnvironmentName == env
I try with Entity Framework this
var result = myContext.Environment
.Where(t => t.EnvironmentName == env)
.Include(s => s.Organizations)
.Where(t => t.OrganizationName == org)
.Include(t => t.Datasets);
but it does not work - the error message says that t.OrganizationName is not a member of Environment - and this is true
OrganizationName and EnvironmentName are unique
How can this be done?