No supported translation to SQL

Posted by derans on Stack Overflow See other posts from Stack Overflow or by derans
Published on 2010-05-07T21:09:39Z Indexed on 2010/05/12 3:34 UTC
Read the original article Hit count: 144

Filed under:

We have this code:

private IList<InfoRequest> GetBy(Func<InformationRequest, string> func, string searchby)
{
    var requests = _dc.InformationRequests
                      .Where(x => func.Invoke(x).Contains(searchby))
                      .OrderBy(y => y.RequestDate);

    return Mapper.Map<InformationRequest[], InfoRequest[]>(requests.ToArray());
}

It continues to throw the no supported translation to SQL error. Any ideas on the problem or how to resolve it?

© Stack Overflow or respective owner

Related posts about linq-to-sql