使用 Simple.Data 映射对象层次结构
有没有人找到返回对象层次结构的最佳方法 多记录集存储过程?
目前我正在提取每个记录集和映射 他们分别进入他们的类型,然后构建主要的 类型。
示例:具有角色和电话号码的帐户对象、存储过程 返回 3 条记录集,一组包含帐户,一组包含电话 帐户的编号以及帐户角色的最后一个编号。
有没有更好的方法将记录集合并为一个,以便我可以投射 直接地?
Has anyone figured out the best way to return an object hierarchy with
a multiple record set stored procedure?
At the moment I am pulling out each of the record sets and mapping
them individually into their types and then constructing the main
type.
Example: an account object with roles and phone numbers, a stored proc
returns 3 record sets, one with the account, one with the phone
numbers for the account and the last with the accounts roles.
Is there a better way of combining the record set into one so that I can cast
directly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
下一个功能(针对版本 0.14,计划在未来几周内发布)是用于查询的 With 子句,它将填充对象层次结构。看到这个问题后,我会考虑如何公开足够的实现以使其在存储过程场景中可用。
The next feature in line (for version 0.14, planned release in the next couple of weeks) is the With clause for queries, which will populate an object hierarchy. Having seen this question, I will think about how to expose enough of the implementation to make it usable in a stored procedure scenario.