from p in context.ParentCompanies
where p.Name.Contains(e.Filter)
orderby p.Name
select new { Company = p.Name + "," + p.Country };
p.Countryまたはその他の属性を追加すると、上記のlinq
クエリは失敗します。
例外:
Could not translate expression 'Table(ParentCompany).Where(p =>
p.Name.Contains(Invoke(value(System.Func'1[System.String])))).OrderBy(p
=> p.Name)' into SQL and could not treat it as a local expression
.