如果GetAddresses()返回IList,有人可以解释为什么我在'results'语句中得到'没有翻译到sql'错误但是如果它返回IEnumerable则没有?
var addresses= GetAddresses(dataContext);
results = results.Where(r => r.People.Any(a => Addresses.Contains(a)));
答案 0 :(得分:0)
你试过了吗?
results = results.Where(r => r.People.Any(a => Addresses.Contains(a))).ToList();