string[] userIds = userList.Split(','); // is an array of integers
IList<User> users = (from user in this.repository.Users
where userIds.Contains(user.Id.ToString())
select user).ToList();
上述查询结果如下:
System.NotSupportedException: LINQ to Entities 不认识 'System.String ToString()' 方法,因此无法将此方法转换为存储表达式
我该怎么办?