从实体框架调用存储过程 - ASP.NET MVC 2
在我的 ASP.NET MVC 2 项目中,我尝试从 EF 调用存储过程,问题是在我按照指示操作后 此处 (走这条路线是因为模型中没有任何内容映射到此存储过程,所以我为这 2 个存储过程添加了 2 个实体)我得到这个错误:
GCTModel.msl(3,4):错误 3027:否 为以下指定的映射 实体集/关联集 - 图库动物列表、图库图像。
现在,由于我必须添加手动实体来映射这些 SP,因此如何消除此错误消息?关于我在这里做错了什么的想法,或者他博客上的这篇文章对于 MVC 2 来说是错误的吗?
In my ASP.NET MVC 2 project I'm trying to call a stored procedure from EF, the problem is after I followed the directions here (went this route because there's nothing in the model that maps to this stored procedure so I added 2 entities for the 2 stored procedures) I get this error:
GCTModel.msl(3,4) : error 3027: No
mapping specified for the following
EntitySet/AssociationSet -
GalleryAnimalLists, GalleryImages.
Now, since I had to add manual entities to map these SP's to how do I get rid of this error message? And ideas on what I'm doing wrong here, or is this post on his blog just wrong for MVC 2?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最终删除了为函数导入创建的手卷实体,并创建了 2 个复杂类型,并将函数导入映射到这些类型,它工作得很好。只是想我会分享我想出的解决方案,以防有人遇到类似的问题
I ended up deleting the hand rolled entities I created for the function imports and created 2 complex types and mapped the function imports to those and it works perfectly. Just thought I'd share the solution I came up with in case someone came along with a similar issue