Nhibernate 3:检索 nn 关系中的列表
我有三个表:工具、颜色和 ColorTool。 ColorTool 有 3 列:id(自动增量)和 IdTool + IdColor。
我有一个 List
,我的目标是检索 List
或 List
(只是 IdColor) 。
我的最后一次尝试:
var colorList = (from res in toolList select res.ToolColor.ToList()).ToList();
在这种情况下,colorList 是 ToolColor 列表的列表。
我不知道如何检索该数据。有人可以帮助我吗?我用的是nhibernate 3.1?
问候
I have three tables : Tool, Color and ColorTool.
ColorTool has 3 columns : the id (auto increment) and IdTool + IdColor.
I have a List<Tool>
and my goal is to retrieve a List<Color>
or a List<int>
(just the IdColor).
My last try :
var colorList = (from res in toolList select res.ToolColor.ToList()).ToList();
In this case colorList is a List of List of ToolColor.
I don't know how retrieve that data. Can someone help me ? I use nhibernate 3.1 ?
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
怎么样
?
How about
?