有没有办法结合使用NHibernate和Linq的两个IQueryable 的结果?(Is there a way to combine results from two IQueryable using NHibernate & Linq?)
我有两个单独的查询,它们都返回相同的IQueryable,我想在投影之前将它们组合起来。 看起来Union和Concat都没有在Linq中实现到NHibernate? 有谁知道我可能会如何实现这一目标?
I have two separate queries that both return the same IQueryable, and I'd like to combine them prior to projection. It looks like neither Union or Concat are implemented in Linq to NHibernate? Does anyone know how I might go about achieving this?
最满意答案
这是不可能的。 你必须在客户端上这样做。
例:
var allItems = queryable1.AsEnumerable().Concat(queryable2)It's not possible. You'll have to do it on the client.
Example:
var allItems = queryable1.AsEnumerable().Concat(queryable2)更多推荐
发布评论