I have an Employer entity, and the employer has 0 or more Employees. I wish to load the employer (with Id = 16) so that it's Employees navigation property only lists English speakers. So I do this:
_uow.EmployerRepository.FirstOrDefault (
o => o.Id == 16
&& o.Employees.Any(a => a.Language == "english"),
"Employees");
Apparently "Any" means, "return all Employee records if any of the employees matches your condition". Using this code my Employer is populated with all of its employees as long as any one of them has their language set to "english".
How do I change the filter it so that the Employees navigation property will only be populated with Employees whose Language property is "english"?