IQueryable<T> with EntityObject using Generics & Interfaces (Possible?)
问题 I have a search repository for EntityFramework 4.0 using LinqKit with the following search function: public IQueryable<T> Search<T>(Expression<Func<T, bool>> predicate) where T : EntityObject { return _unitOfWork.ObjectSet<T>().AsExpandable().Where(predicate); } And another class which uses the IQueryable return value to subset the query in ways that are not possible using the Boolean LinqKit PredicateBuilder expressions: public IQueryable<T> SubsetByUser<T>(IQueryable<T> set, User user)