如今 ASP.NET 动态数据与 Nhibernate 的配合效果如何?

发布于 2024-07-11 13:15:01 字数 61 浏览 8 评论 0原文

我知道有一些人致力于让 Nhibernate 支持 ASP.NET 动态数据。 有人有使用它的实际经验吗?

I know there are a few people working on getting Nhibernate to support ASP.NET Dynamic Data. Anyone got real life experience of using it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

太阳男子 2024-07-18 13:15:01

NHContrib 中当前的实现基于将查询转换为 ICriteria。

当您查询集合成员时,我们遇到了问题。 说:

Get .../Parent(1)/Children 

在这种情况下,您不会得到您期望的孩子列表,而是一些父母列表(据我记得)。

我认为问题的存在是因为 FROM 语句被转换为根标准。 例如

From parent In Parents Where parent.Id = 1 Select parent.Children

...选择部分现在应该是标准的根源,我认为这不是 ATM。

然而,Linq2NHib 的新实现正在开发中。 也许在某个时候我们会有一个适当的实施。 目前 - 没有(与动态数据一起使用)。

The current implementation in NHContrib is based on translating the queries to ICriteria.

We faced an issue when you query for a collection members. Say:

Get .../Parent(1)/Children 

In this case you won't get list of Children as you would expect but some list of Parents (as far as I remember).

I think the issue is there because the FROM statement is translated to root criteria. E.g.

From parent In Parents Where parent.Id = 1 Select parent.Children

... the select part should be now the root of criteria which I think is not ATM.

However a new implementation of Linq2NHib is being developed. Maybe in some time we'd have a propper implementation. At this time - it's no (to be used with Dynamic Data).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文