开发者

NH Linq with FetchMany and ToFutureValue in NH 3.0.0beta

开发者 https://www.devze.com 2023-01-21 02:55 出处:网络
I\'m trying to use the ToFuture with the new NH Linq 3.0 provider. This works fine: var result = ses.Query<Parent>()

I'm trying to use the ToFuture with the new NH Linq 3.0 provider.

This works fine:

var result = ses.Query<Parent>()
                .Where(x => x.Id == id)
                .ToFutureValue();

but when I use a Fetch/FetchMany like t开发者_开发百科his:

var result = ses.Query<Parent>()
                .Where(x => x.Id == id)
                .Fetch(x => X.Child)
                .ToFutureValue();

This exception occurs:

NotSupportedException with: You can also use the AsFuture() method on NhQueryable

Any suggestions?


It's probably not implemented yet (LINQ Futures is one of the most recently added features, just a few weeks ago).

You can enter an issue at http://jira.nhforge.org/


.Fetch(x => X.Child) return IQueryable<>, not NhQueryable<> that's why we got exception

Take a look:

http://www.symbolsource.org/Public/Metadata/Default/Project/NHibernate/3.0.0.GA/Release/All/NHibernate/NHibernate/Linq/LinqExtensionMethods.cs

0

精彩评论

暂无评论...
验证码 换一张
取 消