No supported translation to SQL
- by derans
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?