23913

Question:
I write a linq to Entity:
string[] groups = GetGroups();
var fList = from f in _store.wcf_ServerFarm
join a in _store.ClientAccess on f.ServerFarmName equals a.AccessServerFarmName
join s in _store.Service on f.ServerFarmName equals s.ServerFarmName
where groups.Contains(s.ServerMachineName)
select new { f.ServerFarmAddress, s.ServerMachineName, s.ServiceName, s.ServiceConfig, s.ServicePath };
But .net 3.5 didn't support Contains(), I couldn't upgrade it for some reason. how to figure out it. I try to use "Any(), esql" and so on ,didn't work. Thanks!
Answer1:<a href="http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/095745fe-dcf0-4142-b684-b7e4a1ab59f0/" rel="nofollow">Here</a> is described workaround with building custom expression. Internally it builds a query concatenating a lot of OR
operators. No better workaround is probably available for LINQ in EFv1. <a href="http://msdn.microsoft.com/en-us/library/bb386895%28v=VS.90%29.aspx" rel="nofollow">Entity SQL</a> should work without problem.