CTP5将嵌套类型映射到单个查询中的存储过程结果 [英] CTP5 Mapping Nested Types to Stored Procedure Result in Single Query

查看:107
本文介绍了CTP5将嵌套类型映射到单个查询中的存储过程结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序中有一个复杂的搜索查询,希望能够将结果映射到嵌套实体。我对CTP5中的新原始sql功能非常满意,因为它们允许在服务或
存储库级别上有选择地引入复杂查询。它们在映射结果方面也非常强大。

I have a complex search query in my application and would like to be able to map the results to a nested entity. I am very happy with the new raw sql features in CTP5 as they allow for selectively introducing complex queries where needed on a service or repository level. They are also very powerful in mapping the results.

考虑以下模型:

 


public
 class
 Book {

 public
 int
 Id { get
; set
; }
 public
 string
 Title { get
; set
; }
 public
 Author ThisAuthor { get
; set
; }

} public class Author {
public int Id { get ; set ; } public string Name{ get ; set ; } }

推荐答案

PS ..为什么我的格式化了我编辑帖子时的坚果?
PS.. why did my formatting go nuts when i edited the post?


这篇关于CTP5将嵌套类型映射到单个查询中的存储过程结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆