この例外が発生しました。修正方法はありますか? 私はそれがばかげていることを知っていますが、それを理解できないようです。
サポートされていない式のタイプ:
System.Linq.Expressions.InstanceMethodCallExpressionN
public static IQueryable<T> GetBy<T>(Expression<Func<T, bool>> predicate)
{
try
{
IDocumentSession RavenSession = MvcApplication.Store.OpenSession();
var t = RavenSession.Query<T>().Where(predicate);
RavenSession.Dispose();
//return t.AsQueryable<T>();
return t;
}
catch (Exception e)
{
throw e;
}
}
var r = DB.GetBy<Docs>(x => x.Id == Id).FirstOrDefault(); <-- this is where I get the exception