我正在使用 PredicateBuilder 生成 where 子句
var locationFilter = PredicateBuilder.True<dbCompanyLocation>();
locationFilter = locationFilter.And(s => s.IsPrimary == true && s.State == practiceState);
var companyPredicate = PredicateBuilder.True<dbCompany>();
companyPredicate = companyPredicate.And(c => c.dbCompanyLocations.Where(locationFilter));
我收到以下错误,任何人都可以为此提供帮助,或者我做错了什么。
实例参数:无法从“System.Data.Linq.EntitySet”转换为“System.Linq.IQueryable”