Code snippet
var list =
(from item in entitySet.Clients.AsQueryable()
where listOfId.Contains(item.ID.ToString())
select item).ToList();
Error Message
LINQ to Enti开发者_如何学编程ties does not recognize the method 'Boolean Contains(System.String)' method, and this method cannot be translated into a store expression
Any solution to this ?
Try this:
var list =
(from item in entitySet.Clients
join id in listOfId on item.ID equals id
select item).ToList();
精彩评论