如何将视图链接到VB.NET代码中的模型
我已经使用EDMX的旧程序。在这个中,我将类(表)链接到视图(列的值上的表/过滤器) 我想将该项目迁移到编码。 我复制/粘贴项目删除EDMX文件,并从现有数据库中生成模型。 除了此链接外,一切都很好。
<Table("JoinAffectation")>
partial public Class JointAffectation
public property Id as Long
public IdRecherche as Integer 'the link with my view
<NotMapped>
<ForeignKey("Id")>
PUBLIC OVERRIDABLE PROperty RechercheJoint as ViewRechercheJoint
但是,当我尝试使用表达式使用自动排序/过滤器的功能时 我有错误:在LINQ中,指定的类型成员“ recherCheeXoint”不支持实体。仅支持初始化器,实体成员和实体导航属性。
如果我删除了我的错误,说我不同样的户口和财产...另外,我如何在idrecherche上映射rechercheexhich,
谢谢您的帮助
I've an old programm with edmx. Inside this one, I've linked a class (Table) To a View (Table/filter on a value of a column)
I want migrate this project to code first.
I copy/paste the project delete edmx file and generate models from an existing database.
All is good except this link.
<Table("JoinAffectation")>
partial public Class JointAffectation
public property Id as Long
public IdRecherche as Integer 'the link with my view
<NotMapped>
<ForeignKey("Id")>
PUBLIC OVERRIDABLE PROperty RechercheJoint as ViewRechercheJoint
But When I try to use function of automatical sort/filter using expression
I've error : The specified type member 'RechercheJoint' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.
If I removed I error saying I don't same comumn and property... Also , How Can I stipulate RechercheJoint is mapped on IdRecherche
thanks for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最终使用ModelBuilder,我可以加入我的视图和桌子,例如在EDMX中
Finally Using modelbuilder, I can join my view and my table like in edmx