可以将视图映射到复杂类型 [英] can views be mapped to complex type

查看:76
本文介绍了可以将视图映射到复杂类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

视图通常用于显示只读数据。我的问题是,未来的版本是否允许我将视图映射到复杂类型。复杂没有键,视图也是如此,因此它们很适合观看结果。 


我想知道这个功能是否会在下一个中添加是不是版本?




Zeeshan Hirani Apress的实体框架4.0食谱


http://weblogs.asp.net/zeeshanhirani

解决方案

你应该能够将视图映射到复杂的类型。虽然截至目前我们还没有在设计器中启用此功能,但您应该可以直接在映射文件中执行此操作。


谢谢


Bindesh

SQL开发人员支持


 


[更新]


围绕这个做了一些更多的研究。只要视图具有有效密钥,设计人员似乎确实支持映射复杂类型。将视图中的一个字段标记为设计器中的一个键,然后继续将复杂类型映射到
视图。


 


Views are typically used for displaying readonly data. My question is, will future version allow me to map a view to a complex type. Complex dont have keys and so does views so they are good candidate for a result of a view. 

I want to know if this feature is something that will be added in the next version or not?


Zeeshan Hirani Entity Framework 4.0 Recipes by Apress
http://weblogs.asp.net/zeeshanhirani

解决方案

You should be able to map the views to complex type. Though as of now we don't have this enabled in designer, you should be able to do this inside the mappings file directly.

Thanks

Bindesh
SQL Developer Support

 

[Updated]

Did some more research around this. It appears that the designer does support mapping the complex type as long as the view has a valid key. Mark one of the fields in the view as a key inside the designer and then go ahead and map the complex type to the view.

 


这篇关于可以将视图映射到复杂类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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