Reputation: 2541
I get this exception, any thoughts how to fix? I know its something stupid but can't seem to figure it out.
Expression type not supported:
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
Upvotes: 0
Views: 884