Linq query to call webservice in the where clause
<p>Given the following types</p>

<pre><code>public class User
{
    public long Id { get; set; }

    public string Name { get; set; }
}
public class Context : DbContext
{
    public DbSet&lt;User&gt; Users { get; set; }
}
public interface IMyService
{
    bool IsNameCool(string name);
}
</code></pre>

<p>I need to implement something like that</p>

<pre><code>public class CoolUsersFinder
{
    IMyService _myService;
    private Context _context;

    public CoolUsersFinder(IMyService myService, Context context)
    {
        _myService = myService;
        _context = context;
    }

    public List&lt;long&gt; GetIdsOfCoolUsers()
    {
        return ???
    }
}
</code></pre>

<p>while IMyService is implemented in a webservice, and i don't know how its implementations looks like, and i want to implement GetIdsOfCoolUsers method to return something looks like that </p>

<pre><code>return context.Users.Where(U =&gt; myService.IsNameCool(U.Name) ).Select(U.ID).ToList()
</code></pre>

<p>While my database is really huge and i cannot get all records at once and filter them later, i need the translated code to SQL to be able to filter the data.</p>

<p>Is there any way to do that?</p>