string.format
2 つの db エンティティ A、B で使用SqlFunctions.PatIndex
してからそれらを使用しようとすると、問題に直面しています
IQueryable<Data> dataRecords = DbSet<Data> M_Data;
dataRecords = dataRecords.Where(c => SqlFunctions.PatIndex(sqlFilter, String.Format(A,B)) > 0);
エンティティへの例外 Linq のスローは、メソッド string.Format を認識しません
私が使うときAsEnumarable()
dataRecords = dataRecords.AsEnumerable().Where(c => SqlFunctions.PatIndex(sqlFilter, String.Format(A,B)) > 0).AsQueryable();
この関数は、LINQ to Entities からのみ呼び出すことができます
誰でもこれを行う方法を提案できますか。