problem with Expression not equal types

Posted by user428547 on Stack Overflow See other posts from Stack Overflow or by user428547
Published on 2011-01-08T13:37:08Z Indexed on 2011/01/08 13:54 UTC
Read the original article Hit count: 94

Filed under:
|
    class first
{
    private int? firstID;
}
class second
{
    private int secondID;
    private int secondField;
}

public override Expression<Func<first, bool>> FirstFilter()
{
    Contex db = new Contex();
    List<second> list = (from p in db.second select p).ToList();

return b => list.Select(p => p.secondID).Contains(b.firstID);
}

and i have error: cannot convert from 'System.Collections.Generic.IEnumerable' to 'System.Collections.Generic.IEnumerable' i have tried many diferent ways, but i just don't know how can i fix it.

© Stack Overflow or respective owner

Related posts about c#

Related posts about LINQ